Cap'n Thicky here!
I need to validate a user input value...
Table: tbl-Specimen
Key field: SpecimenID (integer)
Temp variable: TestSpecID (integer)
I can't use 'autonumber' for the key field, so I need to check that whatever the user has entered is unique. I'm a very newbie user so please bear with me! I've got as far as working out that I might need to use a function (which I've called SpecIDOK which takes an integer argument and returns a boolean value so, in theory, somewhere I can say something like...
If SpecIDOK(TestSpecID) then
'User entered a unique ID
'Let them continue with new record entry
else
'User entered a non-unique ID, let them retry or
'abandon new record entry
endif
The problem is, I don't have the code for the SpecIDOK()function - in fact I have a total mental block on the code for the function!
Any ideas?
Mike
I need to validate a user input value...
Table: tbl-Specimen
Key field: SpecimenID (integer)
Temp variable: TestSpecID (integer)
I can't use 'autonumber' for the key field, so I need to check that whatever the user has entered is unique. I'm a very newbie user so please bear with me! I've got as far as working out that I might need to use a function (which I've called SpecIDOK which takes an integer argument and returns a boolean value so, in theory, somewhere I can say something like...
If SpecIDOK(TestSpecID) then
'User entered a unique ID
'Let them continue with new record entry
else
'User entered a non-unique ID, let them retry or
'abandon new record entry
endif
The problem is, I don't have the code for the SpecIDOK()function - in fact I have a total mental block on the code for the function!
Any ideas?
Mike