HELP! What's Up With Time




I keep getting this error message when I try to select a time value from my
combo box:

"The value you entered isn't valid for this field.."

I have a combo box (cboBeginTime) who's Control Source is a field
(BeginTime)with data type DATE/TIME formatted as Long Time. In my table
(TimesAllowed) I input all the times from 12:00:00 AM to 11:59:59 PM and I'm
pulling this data from (TimesAllowed) with this SQL string:

SELECT TimesAllowed.TimesAllowed_ID, TimesAllowed.Times_Allowed FROM

Here's my table:
DaysAllowed_ID (FK to tblDaysAllowed)
TimesAllowed_ID (FK to tblTimesAllowed)
AllowedFrom (Number)
AllowedTo (Number)
BeginTime (Date/Time formatted as Long Time)
EndTime (Date/Time formatted as Long Time)

Times_Allowed (Date/Time)

(tblTimesAllowed Data)
TimesAllowed_ID Times_Allowed
1 12:00:00 AM
2 1:00:00 AM
3 2:00:00 AM
4 3:00:00 AM
5 4:00:00 AM
6 5:00:00 AM
7 6:00:00 AM
8 7:00:00 AM
9 8:00:00 AM
10 9:00:00 AM
11 10:00:00 AM
12 11:00:00 AM
13 11:59:59 PM
14 1:00:00 PM
15 2:00:00 PM
16 3:00:00 PM
17 4:00:00 PM
18 5:00:00 PM
19 6:00:00 PM
20 7:00:00 PM
21 8:00:00 PM
22 9:00:00 PM
23 10:00:00 PM
24 11:00:00 PM

Duane Hookom

I expect you are attempting to save the TimesAllowed_ID (column 1) rather
than Times_Allowed. If you want to store a date/time value, remove the
TimesAllowed_ID from the Row Source, set the column count to 1 and bound
column to 1.



Wow, I made the changes you suggested and it worked. I checked my Main
table to see if the data was written correctly and it was. Thank you very
much Duane for all your help. YOU ROCK!!!


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question