I have searched these forums up and down and cannot seem to figure out my question...
I have a VERY simple database and I am trying to run a query where the fields and parameters are as follows:
First name (like""), Last Name (like""), Event, Event date (Between "" and"")
If there has been no event, then there has been nothing entered in the "Event Date" field, making it a null value at times.
I want to return both the dates of the events that HAVE happened, and the Null dates. If I put IsNull on the second row, it negates the origional parameters of (like "first name" and like "last name").
SELECT [First name], [Last Name], Event, [Event date]
FROM <The name of your table here>
WHERE (([First name] like"D*") AND
([Last Name] like"Br*") AND
(([Event date] Between #1/1/2012# And #31/12/2012#) OR
([Event date] Is Null)
Access is known for delivering false error messages (i.e. there is an error but the message is wrong). Try:
FROM Inventory RIGHT JOIN Seller
ON Inventory.[Seller Number] = Seller.[Seller Number]
WHERE (Seller.[First Name] Like [Type First Name] & '*' ) AND
(Seller.[Last Name] Like [Type Last Name] & '*' ) AND
((Inventory.[Event Date] BETWEEN [Type Beginning Date] And [Type Ending Date]) OR
(Inventory.[Event Date] Is Null)