Runtime Error 13

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

I am using a form to populate a table. One of the fields
on the form is populated by a SQL statement based on 3
other field values. I keep getting a "Runtime Error 13:
Type Mismatch" message. The format of the field I am
trying to populate is currency on the form and the related
table. The query is pulling the value from another
table, but it is also formatted currency. If I run the
query separately and manually populate the where clause, I
get a currency result. Any ideas?

Thanks in advance for your help.
 
When you reference the fields on the form (or a variable
within code), you have to structure the SQL statement
differently than you would in the Query Builder. A text
field is referenced like this '" & fieldname & "'. A
number field is referenced " & fieldName & ". I think
dates are referenced as follows: # & fieldName & #, but I
am not sure.

Hope that helps!
 
Wondering if field type is exact match, as far as type of
number field you have defined for each - number field
size,and decimal places. If one number defined as single
and other field defined as long integer, then you have a
mismatch. Good luck
 
Problem solved. Thanks to all for the help.

-----Original Message-----
Wondering if field type is exact match, as far as type of
number field you have defined for each - number field
size,and decimal places. If one number defined as single
and other field defined as long integer, then you have a
mismatch. Good luck
.
 
Back
Top