R
Rhys Davies
Hi i am having some trouble getting this code to work. On exit of the
membership number field (which is not a primary key and is a text field) I
want it to check the relevant table and see if that number already exists and
just flag it up with a message box but it doesnt like my code on the
..findfirst line. Could someone help me please!
Thanks,
Rhys.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tbldramaloan")
With rs
..MoveLast
..MoveFirst
..FindFirst ("[membershipno]='" & Me!membershipno & "'") 'doesnt like this line
If rs.NoMatch = False Then
MsgBox "You already have a record using this membership number. "
End if
End With
membership number field (which is not a primary key and is a text field) I
want it to check the relevant table and see if that number already exists and
just flag it up with a message box but it doesnt like my code on the
..findfirst line. Could someone help me please!
Thanks,
Rhys.
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tbldramaloan")
With rs
..MoveLast
..MoveFirst
..FindFirst ("[membershipno]='" & Me!membershipno & "'") 'doesnt like this line
If rs.NoMatch = False Then
MsgBox "You already have a record using this membership number. "
End if
End With