robsworld78
Registered User.
- Local time
- Today, 06:51
- Joined
- May 31, 2011
- Messages
- 99
Hi, I'm having issues with a query, it's based on multiple criteria's, a primary ID and a date field.
I've narrowed the problem down to the end of the criteria for the ID, it's the & "*"
The criteria I use for the date is this.
The problem is if charityID = 1 in the combo box the query shows the correct record first but also shows
charityID = 10, 11, 12, 13, 14, etc... 100, 101, etc...
if the ID starts with 1 it will show it.
This seems to be happening from & "*" at the end of the criteria for the charityID. If I remove the date criteria and that & "*" the query returns only charityID = 1 as it should. If I have the date criteria also added without the & "*" they don't work together.
I've tried empty quotes and adding the & "*" to the date criteria as well but it doesn't work.
Any ideas?
Thanks
I've narrowed the problem down to the end of the criteria for the ID, it's the & "*"
Code:
Like [Forms]![SearchBox_CharitiesSalesSummaryReport]![CharityID] & "*"
The criteria I use for the date is this.
Code:
Between [Forms]![SearchBox_CharitiesSalesSummaryReport]![StartDate] And [Forms]![SearchBox_CharitiesSalesSummaryReport]![EndDate] Or Like [Forms]![SearchBox_CharitiesSalesSummaryReport]![SingleDate]
The problem is if charityID = 1 in the combo box the query shows the correct record first but also shows
charityID = 10, 11, 12, 13, 14, etc... 100, 101, etc...
if the ID starts with 1 it will show it.
This seems to be happening from & "*" at the end of the criteria for the charityID. If I remove the date criteria and that & "*" the query returns only charityID = 1 as it should. If I have the date criteria also added without the & "*" they don't work together.
I've tried empty quotes and adding the & "*" to the date criteria as well but it doesn't work.
Any ideas?
Thanks