AfterQBE event

mrmitch

Member
From the Help:
"Fires when the dataset leaves QBE mode, but before the query is executed. You can perform checks on the QBE values, modify QBE values."
I want to force the user to enter at least one criteria in the QBE form. If they don't I want to trap it, but in this event, I don't see any way to test for it.

SQL.Text and SubstitutedSQL are the same no matter if criteria is entered or not.

This should be easy to test, but I'm struggling. Any ideas?
 
Just check the values of the fields. They contain the QBE values during the AfterQBE event.

------------------
Marco Kalter
Allround Automations
 
Thanks. I knew about that method.
Is that the only way? I have many fields on the form and wanted to avoid doing that if possible.

Originally posted by mkalter:
Just check the values of the fields. They contain the QBE values during the AfterQBE event.

 
You can create a generic loop for this, so it should not matter how many fields you have.

------------------
Marco Kalter
Allround Automations
 
Back
Top