R
RedHeadedMonster via AccessMonster.com
I have a login form that will login who is using the database and the date.
It has the following code connected to the onClick event of an OK button:
Dim rosterSQL As String
Set rosterSQL = "Insert into tblLOGIN([rosterID], [loginDate]) Values ('" &
Me.rosterID & "', Now() );"
DoCmd.SetWarnings (0)
DoCmd.RunSQL rosterSQL
please note the tick marks vs. quotes around rosterID: ' " & Me.RosterID &
" '
The form has rosterID as a field. But when I run the code I get a "Compile
error Object required" and the following is highlighted in the code: .
RosterID
Any idea what my hickup is?
Thanx!
RHM
It has the following code connected to the onClick event of an OK button:
Dim rosterSQL As String
Set rosterSQL = "Insert into tblLOGIN([rosterID], [loginDate]) Values ('" &
Me.rosterID & "', Now() );"
DoCmd.SetWarnings (0)
DoCmd.RunSQL rosterSQL
please note the tick marks vs. quotes around rosterID: ' " & Me.RosterID &
" '
The form has rosterID as a field. But when I run the code I get a "Compile
error Object required" and the following is highlighted in the code: .
RosterID
Any idea what my hickup is?
Thanx!
RHM