A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Parameter in a critiria



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2010, 03:55 PM posted to microsoft.public.access.queries
dan
external usenet poster
 
Posts: 1,408
Default Parameter in a critiria

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] & "*"


  #2  
Old March 15th, 2010, 04:13 PM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default Parameter in a critiria

On Mon, 15 Mar 2010 08:55:01 -0700, Dan wrote:

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?
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old March 15th, 2010, 05:29 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Parameter in a critiria

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.


"Dan" wrote in message
...
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] & "*"




  #4  
Old March 15th, 2010, 05:38 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Parameter in a critiria

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

Dan wrote:
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] & "*"


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.