Help: stopping the parameter box!

Charlottew14

Registered User.
Local time
Today, 21:14
Joined
Oct 4, 2012
Messages
32
Hi,

I have attached a test database, which when logging in, records the time you press "enter" and "quit" on the menu - username and password is "test1"

However, I can't get this to work WITHOUT the parameter box popping up.

Does anyone have any ideas? I've been trying to figure it out all day and am failing miserably!!!
 

Attachments

Notice the ' " & Me.[txtUser] & " '
the example above has a single quote with a space then the double quote
Don't leave the space.



strsql = "INSERT INTO tblUserLog ( UserID, InOut )"
strsql = strsql & " VALUES ( '" & Me.[txtUser] & "', 'In' ); "

If you put a break point on the line after the line above in your code
Then in the immediate window (debug window) type in
? strsql
You will see the actual string in the variable.

Also, let me suggest that you type the word
Option Explicit
just under the Compare Database on each code module.

Then run the code menu Debug --> Compile TestLogon
You will find the cboUser.Dropdown is not valid code.
Also, in front of all the cbouser type the ME word (e.g. Me.cbouser.Requery)

I don't have much more time for today.
Judging from your code - let me suggest that you go to this sites Sample Databases
If you search on LOGIN - you will find several free downloads.
Merry Christmas
 
VBA will add Option Explicit automatically if you check the CodeWindowMenu->Tools->Options->EditorTab->RequireVariableDeclaration check box.
 
Right you are!
Guess should put that in the site suggestions so the link to instructions could be cut and pasted. This is the fourth time this week.
 
Doesn't matter that much. The world ends tomorrow.
 

Users who are viewing this thread

Back
Top Bottom