Running a query for Invoices that start with 5

  • Thread starter mugziegumz via AccessMonster.com
  • Start date
M

mugziegumz via AccessMonster.com

How do I create a query that will look up multiple invoices that start with
the number 5? When I type in criteria "5" nothing shows up even though I know
I have plenty.....thanks.
Shannon
 
D

Dale Fye

Is your invoice # numeric or string?

If numeric then try:

WHERE left(cstr([Invoice]), 1) = "5"

or you could use:

WHERE cstr([Invoice]) like "5*"

If the field is a string, then you don't need to do the conversion, so:

WHERE [Invoice] like "5*"

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
J

John W. Vinson

How do I create a query that will look up multiple invoices that start with
the number 5? When I type in criteria "5" nothing shows up even though I know
I have plenty.....thanks.

A criterion of "5" will show all invoices where the field is exactly equal to
the text string "5".

To get "starting with" use the LIKE operator and the wildcard *, which matches
any string: a criterion of

LIKE "5*"
 

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