dlookup

  • Thread starter Thread starter AccessMan
  • Start date Start date
A

AccessMan

I am using two successive DLookUp statements against the same table with
different criteria after a form button is clicked. Sometimes, the second
statement generates an "invalid use of NULL" error, and I can't figure out
why. It is certainly not a data issue. Both calls involve valid criteria.
Has anybody run into a timing issue? Could the first DLookUp have not closed
down its access to the table before the second DLookUp starts? If I comment
out either one of the DLookUp statements the error does not arise.

Thanks!!!
 
AccessMan said:
I am using two successive DLookUp statements against the same table
with different criteria after a form button is clicked. Sometimes,
the second statement generates an "invalid use of NULL" error, and I
can't figure out why. It is certainly not a data issue. Both calls
involve valid criteria. Has anybody run into a timing issue? Could
the first DLookUp have not closed down its access to the table before
the second DLookUp starts? If I comment out either one of the
DLookUp statements the error does not arise.

Thanks!!!

Try a Do Events between the two.
 
Mike - I'm not familiar with that statement, and help was not helpful. Could
I ask for the exact syntax please?
 
AccessMan said:
Mike - I'm not familiar with that statement, and help was not
helpful. Could I ask for the exact syntax please?

It's all one word and it just lets the system catch up with things before
going on.
99.9% of teh time event driven ssoftware is a good thing but sometimes one
event will start before an earlier needed one gets finished.

some code ges here
DoEvents
some more code goes here
 
Back
Top