A
Access::Student
Hey, I've just got a simple button to move to another form, but it's giving
me an error. The code is:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Authorities"
stLinkCriteria = "kp_authorities_id = " & "'" & [kp_authorities_id] & "'"
DoCmd.OpenForm stDocName
Forms(stDocName).Recordset.FindFirst stLinkCriteria
It will bring me to the correct form, but only to the first record, and
gives me the error:
"Datatype mismatch in criteria expression"
But I don't see why my criteria is wrong (the two 'kp_authorities_id' are
the same field).
Am I doing something wrong here? I'm just trying to go between two forms
based on the same table without loosing focus on the current record. Thanks
for any help.
me an error. The code is:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Authorities"
stLinkCriteria = "kp_authorities_id = " & "'" & [kp_authorities_id] & "'"
DoCmd.OpenForm stDocName
Forms(stDocName).Recordset.FindFirst stLinkCriteria
It will bring me to the correct form, but only to the first record, and
gives me the error:
"Datatype mismatch in criteria expression"
But I don't see why my criteria is wrong (the two 'kp_authorities_id' are
the same field).
Am I doing something wrong here? I'm just trying to go between two forms
based on the same table without loosing focus on the current record. Thanks
for any help.