I have an Access form where a user enters a value into a text field. I can get this value through VBA no problem.
However, I want to run a check on this value.
How can I run a SELECT statement in VBA code. What I want to do is the following:
SELECT COUNT(Records) FROM Table WHERE Records = "Value user entered in the form"
Then I need to check if count is zero, and if so, display an error message.
Any ideas?
Many thanks.
However, I want to run a check on this value.
How can I run a SELECT statement in VBA code. What I want to do is the following:
SELECT COUNT(Records) FROM Table WHERE Records = "Value user entered in the form"
Then I need to check if count is zero, and if so, display an error message.
Any ideas?
Many thanks.