I tried that code as well....and it still does not work.
After the DCOUNT command, I am using a ADO connection and using the
RS.MOVEFIRST command.
I keep getting the "No Current Record" error..Which I understand,
becaue the query is empty.
For some reason...it is not ignoring the code.
kingston via AccessMonster.com wrote:
> If you just want the number of records, try DCount():
>
> If DCount("*","Get_All2") = 0 then
> Call Do_Nothing
> End If
>
> (E-Mail Removed) wrote:
> >Hi All,
> >
> >I am trying to use the DLOOKUP command in my VBA code.
> >
> >Basically I want it to lookup my query and if there are no records to
> >skip the rest of my code.
> >
> >Here is what I am using:
> >If dlookup(1, "Get_All2") < 0 Then
> >Call Do_Nothing
> >End If
> >
> >But it is not working....my code is still being run.
> >
> >I have double checked the table the query is pulling from, and there
> >are no records.
>
> --
> Message posted via http://www.accessmonster.com