Input mask in combox Repost

G

Guest

I posted this message the other day but still have the same problem. I did some more testing and found that the only values that are not allowed to be entered into the combox are the morning times that have less than 4 numbers such as 6 am (6:00). I tried switching the value in the table in which it is stored but it changes it back to 6:00 instead of 06:00.

I have a field that is stored as Short Time. I have a combo box that is populated with the default values but the user is allowed to type something other than what is in the combo box. That is fine. The problem that I have is that if I put an input mask on the field when I select the value from the combo box it is giving me an error saying that the value is not allowed. The combo box is formatted for short time as well.

This is the code for the combo box and the input mask that is currently on the combo box.

SELECT tbl_Times.Time
FROM tbl_Times
WHERE (((tbl_Times.Shift)=[forms]![frm_timecardsummarymain2]![shift]) AND ((tbl_Times.Period)="start"))
ORDER BY tbl_Times.Time;

Input mask = 00:00
 
J

John Vinson

I have a field that is stored as Short Time. I have a combo box that is populated with the default values but the user is allowed to type something other than what is in the combo box. That is fine. The problem that I have is that if I put an input mask on the field when I select the value from the combo box it is giving me an error saying that the value is not allowed. The combo box is formatted for short time as well.

This is the code for the combo box and the input mask that is currently on the combo box.

SELECT tbl_Times.Time
FROM tbl_Times
WHERE (((tbl_Times.Shift)=[forms]![frm_timecardsummarymain2]![shift]) AND ((tbl_Times.Period)="start"))
ORDER BY tbl_Times.Time;

Input mask = 00:00

This input mask says SPECIFICALLY that you must - no option - type
four numeric digits. That's what the 0 means - a required digit. In
order to enter 6 am you must type 0600.

If you want to make the first digit optional, change the mask to

90:00
 
G

Guest

I tried that but that didn't work either. I got 9#:## to work though. Thank you for your help.
 

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

Top