Partial Parameters

B

BJM

I hope I can communicate my need here without sounding as
inexperienced as I'm afraid I am!

Is there any way to format a parameter so that it will
return records from a partial match?

For example, I have a group of teachers who are asking to
be able to print out class lists. They only know the
course codes by their first 5 characters. The course code
field is, of course, populated by the entire 8-character
string.

Can I create a course code field parameter that would
return all records whose value *begins* with what the user
enters?

Is there something akin, perhaps, to the LIKE wildcard? Or
VB code that would trim the field value to check for a
match?

Thanks,
BJM
 
B

Bas Cost Budde

Put that Like into the query; then, when you pass as its value some
wildcarded expression (zxcvb*), it will do what you want. So I hope!

Alternative in this case may be to put the parameter in the criteria
line at a column where you have Left(yourField,5) above.
I hope I can communicate my need here without sounding as
inexperienced as I'm afraid I am!

You're better of sounding inexperienced than sounding seasoned when you
aren't!
 
G

Guest

Hi,
Thanks for your reply.

I have tried every which way to put the LIKE in the
criteria row for the class field. It doesn't seem to work.

Will try the Left idea as a separate field and pass the
results to the correct form control.

BJM
 
G

Guest

Ah ha! The asterisk has to be a string value! That's what
I was missing.

Many, many thanks!!!!

BJM

-----Original Message-----
Like [Enter the class code:] & "*"


--
Ken Snell
<MS ACCESS MVP>

Hi,
Thanks for your reply.

I have tried every which way to put the LIKE in the
criteria row for the class field. It doesn't seem to work.

Will try the Left idea as a separate field and pass the
results to the correct form control.

BJM

its
value some want.
So I hope! sounding
as


.
 

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

Similar Threads

Full And Partial Matching 1
Prompt to allow partial data 1
Parameters 2
Query returns wrong records 4
Combine user input and wildcard 1
Parameter Query Curiosity 4
Multiple parameter query 2
query 2

Top