Query to create new file

M

mrrherrera

I want to create a query that will search the database table for a specific
case number. If it doesn't find the number, then it should open a new form
to input the new case. If does find it, then it would open the form with
that specific case. How do I go about doing this?
 
R

Rick Brandt

I want to create a query that will search the database table for a
specific case number. If it doesn't find the number, then it should
open a new form to input the new case. If does find it, then it would
open the form with that specific case. How do I go about doing this?

Just open your form with a WHERE clause that specifies the case number.
The default behavior for such a filter that has no match is to display
the new record position.

DoCmd.OpenForm "FormName",,,,"CaseNumber = 12345"
 
Top