Parameter Trappable Error Code?

C

Cheryl 747

Is there an error code generated by the Parameter Dialog box that can be used
to prevent the Paramater Dialog from appearing? I have a form that pulls-in
data from an Excel spreadsheet and runs the data through several queries.
When the query runs across a bad field name ("engine S/N" instead of engine
SN), for example, I want to end the procedure and direct the user via a
message box to correct the original Excel spreadsheet. (it needs to be
corrected -- other apps are also using it). I have been able to trap every
error but this. Thanks
Cheryl 747
 
A

Allen Browne

No. The parameter dialog is not trappable.

You are probably already discovering that the built-in parameter dialog is
not very useful for serious database applications.

There is almost always a better solution, such as:
- applying a Filter to a form;
- using the WhereCondition of OpenReport;
- assigning the RecordSource using a literal value rather than a parameter;
- building a SQL string in code to OpenRecordset;
- assigning the SQL property of a QueryDef.
 
Top