Parameter Query Curiosity

G

Guest

I have a query that is intended to create class lists for my teachers. I have
used a parameter with wildcards to keep things as user-friendly as possible.

The syntax is as follows:
Like "*" & [Enter the first 6 characters of the course code: ] & "*"

The course codes are alphanumeric; three letters, followed by two numbers, a
letter, a dash, and two more numbers. The field type in the underlying table
is "text".

In an effort to extract a class list for BTT20A-01, for example; if I type
"BTT20A" into the parameter box, I am returned nothing, although there are 49
students in the class! If I type "BTT" (only letters, note), I am returned
all students in all courses beginning with that string. However...

Now here is the curiosity:
If I *copy* a value directly from the query results and then run the query
again, pasting the copied value back into the paramter box, the darn thing
does what I want and returns a class list for just the right class!!!

Any insight as to why, and how I can edit the syntax of the parameter to
allow people to type the value into the box and have it return a result?

Thank you!
 
K

Ken Snell [MVP]

My first thought: are you sure it's zeroes in the table and not ohs?

BTT20A (with a zero)

BTT2OA (with an oh)
 
G

Guest

Ken Snell said:
My first thought: are you sure it's zeroes in the table and not ohs?

Yup. Possitive

The values in this field are all alphanumeric.
BTT20A (with a zero)

BTT2OA (with an oh)
--

Ken Snell
<MS ACCESS MVP>

B. Meincke said:
I have a query that is intended to create class lists for my teachers. I have
used a parameter with wildcards to keep things as user-friendly as possible.

The syntax is as follows:
Like "*" & [Enter the first 6 characters of the course code: ] & "*"

The course codes are alphanumeric; three letters, followed by two numbers, a
letter, a dash, and two more numbers. The field type in the underlying table
is "text".

In an effort to extract a class list for BTT20A-01, for example; if I type
"BTT20A" into the parameter box, I am returned nothing, although there are 49
students in the class! If I type "BTT" (only letters, note), I am returned
all students in all courses beginning with that string. However...

Now here is the curiosity:
If I *copy* a value directly from the query results and then run the query
again, pasting the copied value back into the paramter box, the darn thing
does what I want and returns a class list for just the right class!!!

Any insight as to why, and how I can edit the syntax of the parameter to
allow people to type the value into the box and have it return a result?

Thank you!
 
G

Guest

<blushing...>

Okay, Ken, I owe you an apology.

I have just looked more deeply into the contents of the field values in
question and found that the data entry clerk at the board office has entered
the computer course codes incorrectly. They *should* be zeros, but are, in
fact, letter O's!!!

Thank you for you help.

B. Meincke said:
Ken Snell said:
My first thought: are you sure it's zeroes in the table and not ohs?

Yup. Possitive

The values in this field are all alphanumeric.
BTT20A (with a zero)

BTT2OA (with an oh)
--

Ken Snell
<MS ACCESS MVP>

B. Meincke said:
I have a query that is intended to create class lists for my teachers. I have
used a parameter with wildcards to keep things as user-friendly as possible.

The syntax is as follows:
Like "*" & [Enter the first 6 characters of the course code: ] & "*"

The course codes are alphanumeric; three letters, followed by two numbers, a
letter, a dash, and two more numbers. The field type in the underlying table
is "text".

In an effort to extract a class list for BTT20A-01, for example; if I type
"BTT20A" into the parameter box, I am returned nothing, although there are 49
students in the class! If I type "BTT" (only letters, note), I am returned
all students in all courses beginning with that string. However...

Now here is the curiosity:
If I *copy* a value directly from the query results and then run the query
again, pasting the copied value back into the paramter box, the darn thing
does what I want and returns a class list for just the right class!!!

Any insight as to why, and how I can edit the syntax of the parameter to
allow people to type the value into the box and have it return a result?

Thank you!
 
K

Ken Snell [MVP]

Happens to all of us! Glad you found it. Good luck.

--

Ken Snell
<MS ACCESS MVP>

B. Meincke said:
<blushing...>

Okay, Ken, I owe you an apology.

I have just looked more deeply into the contents of the field values in
question and found that the data entry clerk at the board office has entered
the computer course codes incorrectly. They *should* be zeros, but are, in
fact, letter O's!!!

Thank you for you help.

B. Meincke said:
Ken Snell said:
My first thought: are you sure it's zeroes in the table and not ohs?

Yup. Possitive

The values in this field are all alphanumeric.
BTT20A (with a zero)

BTT2OA (with an oh)
--

Ken Snell
<MS ACCESS MVP>

I have a query that is intended to create class lists for my teachers. I
have
used a parameter with wildcards to keep things as user-friendly as
possible.

The syntax is as follows:
Like "*" & [Enter the first 6 characters of the course code: ] & "*"

The course codes are alphanumeric; three letters, followed by two numbers,
a
letter, a dash, and two more numbers. The field type in the underlying
table
is "text".

In an effort to extract a class list for BTT20A-01, for example; if I type
"BTT20A" into the parameter box, I am returned nothing, although there are
49
students in the class! If I type "BTT" (only letters, note), I am returned
all students in all courses beginning with that string. However...

Now here is the curiosity:
If I *copy* a value directly from the query results and then run the query
again, pasting the copied value back into the paramter box, the darn thing
does what I want and returns a class list for just the right class!!!

Any insight as to why, and how I can edit the syntax of the parameter to
allow people to type the value into the box and have it return a result?

Thank you!
 

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