Haven't found any closely related questions, so here goes.
This is a simple version of my query:
SELECT sampleID, beginDateTime
FROM sample
WHERE DateValue(beginDateTime) = [Enter sample date: ];
This returns no records but should return 3 based on the date I entered.
However, this version returns what I expect, all the records that match the supplied date and their respective times.
SELECT sampleID, beginDateTime
FROM sample
WHERE DateValue(beginDateTime) = #2015-5-18#;
How can I enable a user prompt that is properly formatted in Access SQL that will return the appropriate records? Note: I don't know VBA.
Also tried adding PARAMETER = beginDateTime DateTime; This seems to return all records and assigns them all the date that the user was prompted for.
Tried using DateValue in the parameter list:
SELECT sampleID, DateValue(beginDateTime)
FROM sample
WHERE beginDateTime = [Enter sample date: ];
This only returns dates = 0:00:00
I'd like my query to prompt the user for a date (without a time) and return all records with that date along with their respective times.
I would appreciate your help very much. Thanks in advance.