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!

Having problem with 'between' date function in a Query

Status
Not open for further replies.

mickeyuk

IS-IT--Management
Sep 24, 2004
25
GB
I have written a query In Access 2002 that runs off a form. The user selectis options from combo boxes and also can specify the date range of the records that are displayed.

The query worked until I added the option to search between two dates. Now the query ignores the other options the user has selected and only bring back records matching the date range.

Not sure why the query is ignoring the other criteria? Any ideas?

Thanks in Advance

Michelle
 
You need to post the SQL for the query (SQL View on the first toolbar button in design view).
 
Seems like a OR instead of an AND ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi,

Here is my SQL.I have have included nulls because i want the user to have the option not to select all of the categories.

Code:
SELECT [Tender Detail].[Tender Number], [Tender Detail].Commercial, [Tender Detail].[Business Development Staff], [Tender Detail].Customer, [Tender Detail].ProductDescription, [Tender Detail].[Date Received], [Tender Detail].[Date Due], [Tender Detail].[Tender Sent], [Tender detail.Date Due]-[Tender detail.Date Received] AS [Weeks 4], [Tender Detail.Tender Sent]-[Tender Detail.Date Received] AS [Weeks 5], [Tender Detail.Weeks 5]-[Tender Detail.Weeks 4] AS [Weeks 6], [Tender Detail].[Order Status], [Tender Detail].[quote=Value]

FROM [Tender Detail]

WHERE (([Tender Detail].Commercial) [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Or "«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Is Null))

(([Tender Detail].[Business Development Staff]) [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff] Or "«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff] Is Null))

(([Tender Detail].Customer) [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Or "«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Is Null))

(([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate] Or "«Expr»" Like  [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate] Is Null))

(([Tender Detail].[Order Status]) [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus] Or "«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus] Is Null))

Hope you can help!

Thanks

Michelle
 
No syntax error in this SQL code ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
No syntax error, no error messages come up it just doesn't work as it should.

Michelle
 
Sorry if I am wrong
what is the purpose of "«Expr»" there?

(([Tender Detail].Customer) [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Or "«Expr»"
Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Is Null))
regards


Zameer Abdulla
 
when you use a wizard to build the criteria & use 'like' it puts that in. However if you dont use the wizard to build the criteria it doesn't always work properly.

Michelle
 
My guess:
WHERE ([Tender Detail].Commercial = [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Is Null)
AND
([Tender Detail].[Business Development Staff] = [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff] Is Null)
AND
([Tender Detail].Customer = [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Is Null)
AND
([Tender Detail].[Date Due] >= [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] Or [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] Is Null)
AND
([Tender Detail].[Date Due] <= [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate] Or [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate] Is Null)
AND
([Tender Detail].[Order Status] = [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus] Is Null)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Sorry it doesn't make any difference.

Thanks for trying.

Michelle
 
What is not working ?
Please post some input samples and given result versus expected result.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You seem to have produced something that looks like it should error out as PHV suggests. Lets look at one clause and dissect it.

[Tender Detail].Commercial) ? [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]

the red is a field name and the blue is the value from some control on the form. There is however no operator between the two where I've inserted ? so I've no idea what's suppose to be happening. Are you concatenating them? Doing a comparison?

In the second part

Or "«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Is Null

presumably Access is evaluating

[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Is Null

and returning TRUE or FALSE. It is then trying to determine if "«Expr»" LIKE TRUE or "«Expr»" LIKE FALSE.
That of course is always FALSE. It shouldn't work at all of course because LIKE is a string comparison operator and TRUE or FALSE are not strings.

Finally, your where clause looks like this


WHERE Test1 Test2 Test3 Test4 Test5

but is should look like

WHERE Test1 ? Test2 ? Test3 ? Test4 ? Test5

Where the "?"s represent operators (AND, OR, +, <>, etc.) joining the individual tests.
 
When i posted my SQL I split it up to make it clearer to see & therefore delted the AND & =. Sorry about that! Tender detail is the table.

Here is an example some input & explanation.

The form has four combo boxes & two text boxes.

Business Development (Combo)
Commercial (combo)
Customer (Combo)
Status (combo)
Beginning Date (txt)
End Date (Txt)

So the user could be really specific & use all of the criteria to narrow down the records shown by selecting data in all options or just one/two combo boxes/text boxes.

Before i added the txt boxes the query worked fine. user selected Customer name from list & Status from the list & ALL records matching those 2 criteria would be shown.

However as soon as i added the text boxes it would ONLY bring up the records matching the dates & ignore any other criteria from the combo boes.

E.g user selected Commercial 'Angie',
Beginning Date '10/1/2004'
End Date '10/30/2004'

It SHOULD show all recods matching ALL criteria but it only brough up records matching beginning & end date.

Hope this makes sense, I think its a bit complecated! Sorry.

Many thanks
 
This is what my SQL looks like, thats why I tried to split it up to make it more manageble.

Code:
SELECT [Tender Detail].[Tender Number], [Tender Detail].Commercial, [Tender Detail].[Business Development Staff], [Tender Detail].Customer, [Tender Detail].ProductDescription, [Tender Detail].[Date Received], [Tender Detail].[Date Due], [Tender Detail].[Tender Sent], [Tender detail.Date Due]-[Tender detail.Date Received] AS [Weeks 4], [Tender Detail.Tender Sent]-[Tender Detail.Date Received] AS [Weeks 5], [Tender Detail.Weeks 5]-[Tender Detail.Weeks 4] AS [Weeks 6], [Tender Detail].[Order Status], [Tender Detail].[quote=Value]
FROM [Tender Detail]
WHERE ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus])) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus])) OR ((([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null)) OR ((([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null)) OR ((([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null)) OR ((([Tender Detail].[Order Status])=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].Customer)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].[Business Development Staff])=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) AND (("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].Commercial)=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) AND (("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer]) Is Null) AND (("«Expr»" Like [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus]) Is Null)) OR ((([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate])) OR ((("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null)) OR ((([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate])) OR ((("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null)) OR ((([Tender Detail].[Date Due]) Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate])) OR ((("«Expr»") Like [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate]) AND (([Forms]![frmRFQ Receipt to Tender Sent]![txtenddate]) Is Null));

When the query ran it replicated the the query lines 8 times for each section.

Michelle
 
So I don't see why you said my code don't work as your where clause as nothing to do with the one I suggested.
 
PHV,
I said it didn't make any difference it still didn't rerurn records matching all the criteria selected. It returned all the records matching the date & that was it. I hope this explains??


Michelle
 
I've made it work.

I made a new query & used SQL to write the code NOT the design view. When I used the design view it replicated the same line loads of times, so it was very hard to see anything in the SQL view. Thats why I thought it was best to start again.

Code:
SELECT [Tender Detail].[Tender Number], [Tender Detail].Commercial, [Tender Detail].[Business Development Staff], [Tender Detail].Customer, [Tender Detail].ProductDescription, [Tender Detail].[Date Received], [Tender Detail].[Date Due], [Tender Detail].[Tender Sent], [Tender detail.Date Due]-[Tender detail.Date Received] AS [Weeks 4], [Tender Detail.Tender Sent]-[Tender Detail.Date Received] AS [Weeks 5], [Tender Detail.Weeks 5]-[Tender Detail.Weeks 4] AS [Weeks 6], [Tender Detail].[Order Status], [Tender Detail].[quote=Value]
FROM [Tender Detail]
WHERE ([Commercial]=[Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboCommercial] Is Null)=True AND

([Business Development Staff]=[Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboBusiness Development Staff] Is Null)=True AND 

([Customer]=[Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboCustomer] Is Null)=True AND 

([Date Due] Between [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] And [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate] Or [Forms]![frmRFQ Receipt to Tender Sent]![txtbegdate] Is Null OR [Forms]![frmRFQ Receipt to Tender Sent]![txtenddate] Is Null)=True AND 

([Order Status]=[Forms]![frmRFQ Receipt to Tender Sent]![CboStatus] Or [Forms]![frmRFQ Receipt to Tender Sent]![CboStatus] Is Null)=True;

I've split it up to make it clearer so when you’re writing it in SQL, so don't leave line spaces.

Hope it may be of use to someone.

Michelle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top