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 query



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2009, 09:08 AM posted to microsoft.public.access.queries
zezo
external usenet poster
 
Posts: 1
Default parameter query

Hi, I need help to finish my Query, I want to let the user put a serial
number to get it or put several serial numbers or collect it all
so I did this ...
(',' & [Enter SN's] & ',') Like ('*[, ]' & [Requisition Lines]![SN] & '[, ]*')
this is work to give a specific serial, but if I want let the users show all
serial numbers by clicking enter without write any number what is missing in
this ???

I appreciate ur cooperation
  #2  
Old December 15th, 2009, 02:09 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default parameter query

Try entering the following as the criteria:

((',' & [Enter SN's] & ',') Like ('*[, ]' & [Requisition Lines]![SN] & '[,
]*') OR [Enter SN's] is Null)

If you are doing this using design view you should have two columns that look like

Field: Expr1: ',' & [Enter SN's] & ','
Criteria(1): Like ('*,' & [Requisition Lines]![SN] & ',*'
Criteria(2): LEAVE BLANK

Field: Expr2: [Enter SN's]
Criteria(1): LEAVE BLANK
Criteria(2): Is Null

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

zezo wrote:
Hi, I need help to finish my Query, I want to let the user put a serial
number to get it or put several serial numbers or collect it all
so I did this ...
(',' & [Enter SN's] & ',') Like ('*[, ]' & [Requisition Lines]![SN] & '[, ]*')
this is work to give a specific serial, but if I want let the users show all
serial numbers by clicking enter without write any number what is missing in
this ???

I appreciate ur cooperation

 




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 08:35 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.