2 parameters in one query

MissAnna

Registered User.
Local time
Today, 18:35
Joined
May 14, 2002
Messages
10
Hello,

I have a query containing two parameters, one is for a date range and the other for an identifier. it looks like this

In the 'or' line of the date column:
Is Null or Between [start date] and [end date]

and in the 'criteria' line of the identifier column:
[Enter Identifier]

Unfortunately I cannot get both these parameters to work ithin the one query, if I don't enter a date (i.e. is null) the identifier parameter works, if I enter the dates and the identifier, then the identifier is not shown and I get all the identifiers...

Can anybody advise me on this?

Thanks!
Miss Anna
 
Ah, that makes sense. Thanks Pat!

here is the SQL

SELECT tblPayments.[Payment Type], tblPayments.Date, tblPayments.[Cost Centre], tblPayments.Account, tblPayments.Identifier, tblPayments.[Supplier Name], tblPayments.[GST Free], tblPayments.[GST Included], [GST paid]*10 AS [GST Exempt], [GST Included]/11 AS [GST paid], tblPayments.Description
FROM tblPayments

WHERE (((tblPayments.[Cost Centre])=[Enter Cost Centre])) OR (((tblPayments.Date) Between [Enter start date] And [Enter end date]))
ORDER BY tblPayments.Date;


Much appreciated,
Anna
 

Users who are viewing this thread

Back
Top Bottom