Error using a form control for a query criteria in an adp database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am selecting a specific record in a form, then trying to write a query to total all records (an amount field) before that record. The record has a SequenceNumber field. I have the SequenceNumber control on the form and type in the query to sum all amounts with the criteria entered as "<forms!formSelect!SequenceNumber". I think I am comparing the same field in the table with the corresponding control on the form. But I get a "Data Type mismatch" error.

Why, and more importantly, how to I write the criteria so it will match?
 
Bob,

Did you enclose your criteria expression in quotes just for this posting, or
ydid you put them in the query design by any chance? In the latter case,
remove them (assuming, of course, the SequenceNumber field is numeric).

HTH,
Nikos

Bob Scott said:
I am selecting a specific record in a form, then trying to write a query
to total all records (an amount field) before that record. The record has a
SequenceNumber field. I have the SequenceNumber control on the form and
type in the query to sum all amounts with the criteria entered as
"<forms!formSelect!SequenceNumber". I think I am comparing the same field
in the table with the corresponding control on the form. But I get a "Data
Type mismatch" error.
 
Back
Top