Using Like operator in form-based parameter query

S

Scott A

I'm using a form to collect parameters for a query (which
is then used to limit the items displayed on the
continuous form...)

I've added an unbound combo box control that lets the user
select elements that form part of a serial number (in
other words, all serial numbers that contain 103). The
user selects these from a value list (the combo box is set
to be limited to list).

I'm trying to get the criteria in the query right, but
it's not working - I don't know whether I need to change
the properties of the values in the list (I've tried
101;102;103 and "101";"102";"103"...), or if I'm
referencing the value from the form incorrectly in the
query. I'm using the following criteria

Like "*" & [Forms]![fmnuDVPList]![cboPartNumber] & "*"

I guess I just don't understand how access wants to see
things in brackets - I have an example of a parameter
query (not form-based) that uses this syntax. I've tried
other variants like:

Like "*[Forms]![fmnuDVPList]![cboPartNumber]*"
Like "*([Forms]![fmnuDVPList]![cboPartNumber])*"
Like "*" & "[Forms]![fmnuDVPList]![cboPartNumber]" & "*"

Can anybody tell me how this should be written?

Thanks,

Scott
 

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