Results 1 to 8 of 8
  1. #1
    mbenton's Avatar
    mbenton is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Posts
    73

    Auto type time in a combo box without the need for typing the colon.


    Hello: I have created a combo box on a form. The row source of the combo box is a table called dbo_Timestbl. It has two fields; 1. Timesfld, which holds all military time i.e., 06:00, 06:30, 06:45.....23:00,. The second field is called Timesnocol which is the exact duplicate time list but without the colon, for example it has 0600, 0630, 0645,...2300. Users click on the drop down and select the time the time slot they desire. It works great! However, it faster for the user to begin typing the time and have Access complete including the colon. In other words users should be able to type the Timesnocol time but have Access select the corresponding time from the other field which includes the colon. For example, if I were a user I could type 0600 and tab to the next field on the form. In this example Access should select 06:00 from the other field in the table and store that value rather than the 0600 which was typed by the user. As it stands now, when I type in the complete time without the colon I receive an error message stating that the value is not on the list. I then have to stop and physically add a colon or scroll down the list and select the correct time with the colon. This may not seem like a big deal but every second counts and speed is on demand. Users don't want to stop and add the colon or even scroll down the list to select the time...they would rather not have to break the momentum and type the time without the colon. We need to have the time with the colon stored because it's used on a report that follows the form. Can anyone offer any suggestions? * Tables are on lockdown therefore I cannot modify the design of the table.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    Bind the control to the 2nd column.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  3. #3
    mbenton's Avatar
    mbenton is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Posts
    73
    Thanks RuralGuy, I had it bound to the incorrect field, I changed it and it works...Although I can see all my optional times in the drop down combo box for some crazy reason only times beginning at 6:00am through 12:00am are showing in the field when I select. In other words if I try to select 1:00am for example, I can see it as optional and I scroll to it and select it expecting to then see 1:00 am in the field, however it goes blank. It does this for every time after midnight until 6:00am. However when I view the Report I see any times I selected including those times after midnight. I've spent countless hours on this but can't figure out problem with the form (combo box).

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    Is it bound to a text field?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    The colon is just a display element. You could just store the 0600 and add the 06:00 when it prints the report.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  6. #6
    mbenton's Avatar
    mbenton is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Posts
    73
    I have a select statement in the Raw Source on the Data tab that selects both time options (with and without the colon i.e., 6:00 and 0600), which are two fields of the same table. Other than that they are not bound to text.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    In post #3 you said the ComboBox was Bound (had a Control Source). Is that no longer true?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923
    How do you get values into a table for the later report if the Control is not Bound?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-15-2015, 10:41 AM
  2. Replies: 7
    Last Post: 03-16-2014, 03:20 PM
  3. Replies: 1
    Last Post: 02-26-2014, 03:19 PM
  4. Replies: 2
    Last Post: 05-31-2013, 03:27 PM
  5. Replies: 1
    Last Post: 11-21-2010, 02:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums