T
ToyFixer
I have a database with the following objects
CostCentres - table : CostCentreCode(primary key), CostCentrePassword,+ some
more as columns
frmSelectCC - the login form which has :
cmbCostCentre - combo box to select the Cost Centre
txtPassword - text box to type in the password
frmSelectGLC - the form that should open up when the password is correct
I wrote the following code but the debugger stops at the first line (which
is shown below)
Could someone tell me where I got it wrong?
If Me.txtPassword.Value = DLookup("CostCentrePassword", "CostCentres",
"CostCentreCode = " & Me.cmbCostCentre.Value) Then
DoCmd.OpenForm "frmSelectGLC"
Else
MsgBox "Invalid Password! Please Try Again", vbOKOnly, "Budget
Collection System"
Me.txtPassword.SetFocus
End If
CostCentres - table : CostCentreCode(primary key), CostCentrePassword,+ some
more as columns
frmSelectCC - the login form which has :
cmbCostCentre - combo box to select the Cost Centre
txtPassword - text box to type in the password
frmSelectGLC - the form that should open up when the password is correct
I wrote the following code but the debugger stops at the first line (which
is shown below)
Could someone tell me where I got it wrong?
If Me.txtPassword.Value = DLookup("CostCentrePassword", "CostCentres",
"CostCentreCode = " & Me.cmbCostCentre.Value) Then
DoCmd.OpenForm "frmSelectGLC"
Else
MsgBox "Invalid Password! Please Try Again", vbOKOnly, "Budget
Collection System"
Me.txtPassword.SetFocus
End If