If a Query has no records, don't let me click a button

charliemopps

Registered User.
Local time
Today, 00:22
Joined
Feb 24, 2009
Messages
40
So I have buttons that "Go to the next record" and that "Complete the record" (put a time stamp in the record that it's been worked)

The problem is that the form is based on a querry, and once all records have timestamps there are no records for the querry. So when you click the "Go to next record button" it errors out. There is no record.

I do have a counter on my form, that tells you how many records are left. When they are all gone, that also vanishes (it's just a groupby and sum)

Is there a way for me to have the VB code look at the countup querry, and if there are no records, have the button not work?

Thanks!
 
I figured it out I think...

If Me.random_field <> 0 Then
do the button stuff
end if
 

Users who are viewing this thread

Back
Top Bottom