Query in Forms

Gailoni

New member
Local time
Tomorrow, 02:39
Joined
Jul 15, 2008
Messages
4
I am doing a database of my own use and I use a query to fetch data from 3 tables to be displayed on a form. I then use the form to update the data. Can someone help me on;
1. HOW I CAN STOP THE FORM FROM OPENING IF THE QUERY RETURNS NO DATA. AND
2. TO DISABLE THE NEXT RECORD BUTTON WHEN I AM ON THE LAST RECORD ON THE FORM.
 
1) Me.RecordSet.RecordCount = 0 Tells you there are no records. You could test for this in the OnLoad event of the form and put up a MsgBox.

2) in the On current event check the current record number against the record count and if they are the same you could then lock the Next record button.
 

Users who are viewing this thread

Back
Top Bottom