NOOB question here.
I have an equipment testing log database that uses a Short Text field for Serial Number (Some serial numbers have characters in them).
I have a query that uses the Criteria of [Enter Serial Number] for the Serial Number field.
If the Serial number exists it display a form with every time that serial number was tested etc.
If the entered serial number is NOT in the database it just opens a blank form.
What I am trying to do is use the DCount function in an IF statement to prevent the blank form from opening and instead display a message box saying there were no records.
The problem is I cannot get DCount to work. When I type is as shown on the attached picture, I get an unable to parse error.
Serial Number is the field I am looking at. QRY-Serial Number Look Up is the query that I use to find the records associated with a particular serial number.
I have an equipment testing log database that uses a Short Text field for Serial Number (Some serial numbers have characters in them).
I have a query that uses the Criteria of [Enter Serial Number] for the Serial Number field.
If the Serial number exists it display a form with every time that serial number was tested etc.
If the entered serial number is NOT in the database it just opens a blank form.
What I am trying to do is use the DCount function in an IF statement to prevent the blank form from opening and instead display a message box saying there were no records.
The problem is I cannot get DCount to work. When I type is as shown on the attached picture, I get an unable to parse error.
Serial Number is the field I am looking at. QRY-Serial Number Look Up is the query that I use to find the records associated with a particular serial number.