Data type mismatch

I

Igor

Could anyone help?
I have a problem with printing a report from the mde on
windows 98 machine. I sent a criteria programaticaly into
the report from the form. It does not break in the .mdb
and does not break on the mde on win 2k computer only on
windows 98 that I am having a problem. Does anyone know
what it could be?

Thank you
Igor
 
A

Allen Browne

Two suggestions:
1. Coerce the data type.
2. Use the correct delimiters.

1.
If the text box on the form is unbound, set its Format property to indicate
the data type. For example, use Short Date, or General Number.

If the data is from a calculated field in a query, explicitly typecast by
wrapping the calculation in CVDate(), CLng(), CCur(), etc.

If the data is from a parameter in a query, declare the parameter so you can
specify the data type. In query design view, choose Parameters from the
Query menu.


2.
For a Text type field, use quote marks, e.g.:
"Surname = """ & Me.txtSurname & """"
For a Date type field, use #, and format American:
"MyDate = " & Format(Me.txtMyDate "\#mm\/dd\/yyyy\#")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top