Issue regarding dates, day and a query. (1 Viewer)

K

kazooie

Guest
Ok here goes.

I have a form which is made up of 3 textboxes.

txtbookingdate, txtbookingday and cbobookingtime.

Now what this form is sposed to do is the following.

1. A date is entered into txtbookingdate. (data type = date/time). format = dd/mm/yyyy
2. The date is then converted into a "day" and stored in txtbookingday.
3. Based on what day is in txtbookingday, a query is run which displays the assoiciated times in cbobookingtime.

I cant seem the bugger to do anything really.
Cheers
 
R

Rich

Guest
Since your storing the date, there's no point in storing the day as well it can be retrieved at any time from the date
 
K

kazooie

Guest
well if thats the case,


why doesnt this work then?

SELECT tblBooking_Time.Booking_Time
FROM tblBooking_Time
WHERE forms!frmbooking!txtbooking_date=tblbooking_time.booking_day;
 
R

Rich

Guest
Because you have to use the DatePart function, and in any case you're looking for the day in your query not the date, or do you want to return all records for say every Monday?
 
K

kazooie

Guest
When the date is equal to say a monday, i want all the bookingtime records associated with monday returned.

The date still has to be stored in the bookingdate table in the dd/mm/yyyy format too.
 

Users who are viewing this thread

Top Bottom