open form criteria ?

R

r

A step in my macro is to open a form where the record in the new form will
match the value selected on the first form's dropdown box. The IDs,
unfortunately, are text and not numeric, so I'm having trouble finding the
right record in the set.

my "where" is:

[customerID] = [forms]![details]![customerID]

but despite my variations in writing this, I get either a type mismatch, or
a new record comes up (though I can see the filter has been applied).

The dropdown box I'm using to select the customerID on the first form is not
bound to anything, though I'm certain it's using the correct value (the ID)
and not the customer name, which is the only other field displayed.

I'm guessing this is just a problem because the equation thinks i'm looking
for a numeric value, but I'm not sure how to put quotes, or whatever, to
indicated the value is text.

Help?!
 
T

tina

last time i tested an OpenForm action's WHERE condition in a macro, the
"right" side of the equation did not need to be specified as text, or date,
or whatever - as long as the data types of the left side and the right side
matched.

take a look at the customerID field in the table that the "new" form is
bound to. what's the field's data type?
take a look at the customerID field in the table that is the RowSource of
the combo box. what's the field's data type?
do the two data types match?
what's the value of BoundColumn property of the combo box in the form? how
many columns are in the combo box? and what order are the fields in, in the
combo box droplist?
 
R

r

Hi Tina,

I've double checked all that you mentioned (again) and everything is in
order. Please see my newer post "Totally Stumped" for more details if you
think you can help. Thanks.


tina said:
last time i tested an OpenForm action's WHERE condition in a macro, the
"right" side of the equation did not need to be specified as text, or date,
or whatever - as long as the data types of the left side and the right side
matched.

take a look at the customerID field in the table that the "new" form is
bound to. what's the field's data type?
take a look at the customerID field in the table that is the RowSource of
the combo box. what's the field's data type?
do the two data types match?
what's the value of BoundColumn property of the combo box in the form? how
many columns are in the combo box? and what order are the fields in, in the
combo box droplist?


A step in my macro is to open a form where the record in the new form will
match the value selected on the first form's dropdown box. The IDs,
unfortunately, are text and not numeric, so I'm having trouble finding the
right record in the set.

my "where" is:

[customerID] = [forms]![details]![customerID]

but despite my variations in writing this, I get either a type mismatch, or
a new record comes up (though I can see the filter has been applied).

The dropdown box I'm using to select the customerID on the first form is not
bound to anything, though I'm certain it's using the correct value (the ID)
and not the customer name, which is the only other field displayed.

I'm guessing this is just a problem because the equation thinks i'm looking
for a numeric value, but I'm not sure how to put quotes, or whatever, to
indicated the value is text.

Help?!
 

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