krishnanhemanth
Registered User.
- Local time
- Today, 16:16
- Joined
- Jun 12, 2009
- Messages
- 115
i get a runtime error 2471 -- the expression you enterd as a query parameter produced this error :
on the following code
Private Sub ENTER_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.sboard) Or Me.sboard = "" Then
MsgBox "You must select a module.", vbOKOnly, "DREAMKRAFTS"
Me.sboard.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.password) Or Me.password = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "DREAMKRAFTS"
Me.password.SetFocus
Exit Sub
End If
'Check value of password in tbl switchboardpasswords to see if this matches value chosen in combo box
If Me.password.value = DLookup("sbpassword", "switchboardpasswords", "[sbid]=" & Me.sboard.value) Then
sbid = Me.sboard.value
'Close logon form and open splash screen
DoCmd.OpenForm Me.sboard
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.password.SetFocus
End If
End Sub
table switchboardpasswords
sbid -- switchboard id autonumber
switchboard - name of the switchboards
sbpassword - assigned passwords
on the form
sboard - combobox with values from the table switchboardpasswords
password - unbound textbox where user enters the password
please help
krishnanhemanth
on the following code
Private Sub ENTER_Click()
'Check to see if data is entered into the UserName combo box
If IsNull(Me.sboard) Or Me.sboard = "" Then
MsgBox "You must select a module.", vbOKOnly, "DREAMKRAFTS"
Me.sboard.SetFocus
Exit Sub
End If
'Check to see if data is entered into the password box
If IsNull(Me.password) Or Me.password = "" Then
MsgBox "You must enter a Password.", vbOKOnly, "DREAMKRAFTS"
Me.password.SetFocus
Exit Sub
End If
'Check value of password in tbl switchboardpasswords to see if this matches value chosen in combo box
If Me.password.value = DLookup("sbpassword", "switchboardpasswords", "[sbid]=" & Me.sboard.value) Then
sbid = Me.sboard.value
'Close logon form and open splash screen
DoCmd.OpenForm Me.sboard
Else
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
Me.password.SetFocus
End If
End Sub
table switchboardpasswords
sbid -- switchboard id autonumber
switchboard - name of the switchboards
sbpassword - assigned passwords
on the form
sboard - combobox with values from the table switchboardpasswords
password - unbound textbox where user enters the password
please help
krishnanhemanth