Parameter in a critiria

D

Dan

We do 3 different types of estimates, Cut, LCP & Misc with any possible
combination of them (7). I want to see how estimates were done for a
specific day. In the criteria I put [Enter Date] & it works fine. Now I
also want to see how many Cuts were done for that day and I have tried using
both of the following in the EstType criteria and it does not work.

[EstType] LIKE Nz([Type of Estimate], "") & "*"

Like [Type of Estimate] & "*"
 
F

fredg

We do 3 different types of estimates, Cut, LCP & Misc with any possible
combination of them (7). I want to see how estimates were done for a
specific day. In the criteria I put [Enter Date] & it works fine. Now I
also want to see how many Cuts were done for that day and I have tried using
both of the following in the EstType criteria and it does not work.

[EstType] LIKE Nz([Type of Estimate], "") & "*"

Like [Type of Estimate] & "*"

Just a helpful tip to help you get good responses when asking
questions in newsgroups.
Words like 'That didn't work' gives any potential reader who might
want to help you absolutely no useful information.
What didn't happen?
What did happen?
What did you expect to happen?
Exactly how did you implement the help given you?
Did you enter your table and field names in place of the generic ones
given?
Where did you place the code?
What is the exact code you wrote (copied directly from your database
and pasted here so we can see if you didn't simply mis-write the
code)?
Answers to those questions would be helpful to us .... to help you!

Please copy and paste the query's Where clause SQL into a reply
message.
It would also be helpful if you let us know the [EstType] field's
datatype. Is it Number or Text?
 
J

Jeff Boyce

To add to Fred's excellent observations, "how" depends on "what", and we
don't know what data you are working with.

Please also describe your table structure.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

John Spencer

Assuming that you have values in the field like
Cut and LCP
Or Cut
Or LCp, Cut, Misc

You could search for
EstType Like "*" & [Enter Type of Estimate] & "*"

That said, you have a design problem. You are storing multiple facts in one
field. Good design would be to have an additional table to store the
EstimateID and the EstType. You would have zero to 3 (or more if you add more
estimate types) records for each estimate to specify the estimate type.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

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