Re: Error exiting database
From: Brendan Reynolds (brenreyn)
Date: 12/14/04
- Next message: fredg: "Re: Why won't my parameter query use the form I created to pass values"
- Previous message: Paul B.: "RE: Using the down arrow"
- In reply to: Glenn Suggs: "Re: Error exiting database"
- Next in thread: Glenn Suggs: "Re: Error exiting database"
- Reply: Glenn Suggs: "Re: Error exiting database"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Dec 2004 17:04:21 -0000
Are you using the 'Require Variable Declaration' option? Do you have 'Option
Explicit' at the top of the form's code module? If so, does the code compile
without error if you choose 'Compile <your project name>' form the Debug
menu in the VBA editor?
-- Brendan Reynolds (MVP) http://brenreyn.blogspot.com The spammers and script-kiddies have succeeded in making it impossible for me to use a real e-mail address in public newsgroups. E-mail replies to this post will be deleted without being read. Any e-mail claiming to be from brenreyn at indigo dot ie that is not digitally signed by me with a GlobalSign digital certificate is a forgery and should be deleted without being read. Follow-up questions should in general be posted to the newsgroup, but if you have a good reason to send me e-mail, you'll find a useable e-mail address at the URL above. "Glenn Suggs" <GlennSuggs@discussions.microsoft.com> wrote in message news:623236CE-DC0F-48E4-8096-8696A93AA322@microsoft.com... > Sorry, yes that was a typo. It's DoCmd.Quit > > The Load Event looks like this but I don't understand why it would fire > after the DoCmd.Quit statement. (As you can see, it references some of my > own functions located elsewhere in the project.) > > Private Sub Form_Load() > > Me.txtWorkstationID = UCase(Environ("USERNAME")) > > If UserIsDataEntry Then > Me.cmdMainMenu.Enabled = False > Me.cmdFind.Enabled = True > Else > Me.cmdMainMenu.Enabled = True > Me.cmdFind.Enabled = False > End If > > If Not UserIsAdmin And Not UserIsAnalyst Then > Me.cmdCoordinatorAdd.Enabled = False > End If > > End Sub > > > > "Brendan Reynolds" wrote: > >> >> Does the code really say 'DoCmd.Exit', or was that a typo? If it really >> says >> 'DoCmd.Exit', that would certainly cause errors, as the DoCmd object >> doesn't >> have an Exit method. (You probably meant DoCmd.Quit?) >> >> The error message, though, indicates that the problem is in the Load >> event >> of the form, not the Click event of a command button. What does the code >> in >> the Load event look like? >> >> -- >> Brendan Reynolds (MVP) >> http://brenreyn.blogspot.com >> >> The spammers and script-kiddies have succeeded in making it impossible >> for >> me to use a real e-mail address in public newsgroups. E-mail replies to >> this post will be deleted without being read. Any e-mail claiming to be >> from brenreyn at indigo dot ie that is not digitally signed by me with a >> GlobalSign digital certificate is a forgery and should be deleted without >> being read. Follow-up questions should in general be posted to the >> newsgroup, but if you have a good reason to send me e-mail, you'll find >> a useable e-mail address at the URL above. >> >> >> "Glenn Suggs" <GlennSuggs@discussions.microsoft.com> wrote in message >> news:A4517858-C29D-4244-82D7-87887A5A0128@microsoft.com... >> >I wasn't sure in which category to post this question but since the >> >button >> >is >> > on "form" I'm putting it here. The only code behind the button is: >> > DoCmd.Exit >> > I get the error message >> > The expression On Load you entered as the event property setting >> > produced >> > the following error: There was a problem referencing a property or >> > method >> > of >> > an object. >> > This error message seems to only come up in the compiled .mde version >> > of >> > the >> > database. Can anyone help with this? >> > Thanks >> > -- >> > Glenn >> >> >>
- Next message: fredg: "Re: Why won't my parameter query use the form I created to pass values"
- Previous message: Paul B.: "RE: Using the down arrow"
- In reply to: Glenn Suggs: "Re: Error exiting database"
- Next in thread: Glenn Suggs: "Re: Error exiting database"
- Reply: Glenn Suggs: "Re: Error exiting database"
- Messages sorted by: [ date ] [ thread ]