Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default value for prompt?

Status
Not open for further replies.

jinexile

IS-IT--Management
Dec 17, 2004
3
CA
I have a query that prompts for the date and shift for downtime of certain departments. I want to be able to select a specific shift or all if none is entered.

here's a snippet of the sql:
WHERE ((([Sawmill Service Records].ServiceDate) Between [Enter Start Date] And [Enter End Date]) AND (([Sawmill Service Records].Shift) Like [Enter Shift])
 
Try something like
Code:
WHERE [Sawmill Service Records].ServiceDate  
      Between [Enter Start Date] And [Enter End Date] 

AND ([Sawmill Service Records].Shift Like [Enter Shift] OR
     Len([Enter Shift]) = 0 )
 
nope,

also tried
Code:
AND ([Sawmill Service Records].Shift Like [Enter Shift] OR
     [Enter Shift] = "" )
 
The problem may be that you don't have a mask on your like clause. Try this
Code:
AND ([Sawmill Service Records].Shift Like [Enter Shift] & '*' OR
     Len([Enter Shift]) = 0 )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top