Well, to be able to check textBoxS you have to open the form first. The
controls on the form doesn´t have any value what so ever until the form have
been loaded.
So you have to check the value which should have been loaded into textBoxS
BEFORE you try to open the form and then DoCmd.Cancel on the event
DoCmd.Open (form).
One way is to use DLookUp function if you don´t want to use SQL. But to be
able to help you out with this one I need to know the name of the table or
query which is the recordsource to the form you try to open. I also need to
know the name of the field which should have been the controlsource for
textBoxS. And I need to know the evaluation you want to make.
Do you try to open the form from a cmd in another form or what?
// Niklas
alekm said:
We are back at square one!
I want to close form immediately if underlaying sql fills textBoxS with
null but I dont want to introduce additional sql
before opening the form to just check whether textBoxS would be null or not.
So lost focus event is not the clue.
In other words: how to prevent form from opening if it's textBoxS would be
null after opening, not introducing additional sql