isladogs
MVP / VIP
- Local time
- Today, 23:22
- Joined
- Jan 14, 2017
- Messages
- 18,209
Hi Colin.....not sure you got my message but i can't seem to get the LogOut code from the Log me Out button on frmSessions to work with my Quit Button on my switchboard. I added the code and then added a DoCmd.Quit directly after it but it gives me a Data Member Not Found error. I tried adding a reference to the form frmSessions to the code but it didn't work ?
I changed Me.1stSessions.Requery to
Forms![frmSessions]!1stSessions.Requery
Sorry - only just noticed this. Drowning in emails today....
I'm a little confused here.
First of all, did you use/adapt the entire code behind that button?
Is frmSessions open? If not you would get an error
If you are about to quit and don't actually have frmSessions open at the time, just omit the Requery line. Its not needed unless you are viewing the form (or if you are about to quit!)
Follow that logoff code with Application.Quit (which is preferable to DoCmd.Quit)
You may need to add a DoEvents line first to ensure the logoff does occur before the app quits.
If that doesn't help, perhaps it would be easier for me to follow if you can upload the relevant parts of your database. Remove any confidential data and all irrelevant objects