Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Based on Query 1

Status
Not open for further replies.

tpearo

Technical User
Apr 24, 2000
124
US
I have a form that opens based upon a query where the query asks for a Report#. The Report # resides in a table the query is based around. I need the form to open only if the Report # exists. The report # is an Auto assign field in the table and sometimes the technicians using this database input a report # that doesn't yet exist. When they do this the form opens up but is a complete blank screen with no fields visable and of course then locks up the system because they do not know what to do next.

Any help would be appreciated.

Tp
 
Provided you'll never use this form for adding new record, you may add this in the Open event procedure of the form:
If Me.Recordset.RecordCount <= 0 Then
Cancel = True
Exit Sub
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top