Time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Would like a user to be able to select hours and minutes in a 24 hours time
format, from a dropdown box, like a user can select a date from a popup
calendar.
 
Would like a user to be able to select hours and minutes in a 24 hours time
format, from a dropdown box, like a user can select a date from a popup
calendar.

What level of precision? Every hour, every fifteen minutes, every
minute, every second?

You can create a little Table with all of the desired time values
(shortcut: create the list of times in Excel by entering, say, 12:00am
in A1, 12:05am in A2, and then using "Fill Down" to fill out the full
day, and import this table into Access).

Base a combo box on your Form on this stored table.

John W. Vinson[MVP]
 
I'm sorry that I was not that specific. I would like the user to be abe to
choose up to every minute. Also would like a combo box with 2 rows. First row
showing the hours starting at 00 until 23 and the second row the minutes
starting at 00 until 59. Would like the user to be able to highlight the
hours first and after the minute is clicked that the time displays in the
combo box or text box when using a command button.
 
I'm sorry that I was not that specific. I would like the user to be abe to
choose up to every minute. Also would like a combo box with 2 rows. First row
showing the hours starting at 00 until 23 and the second row the minutes
starting at 00 until 59. Would like the user to be able to highlight the
hours first and after the minute is clicked that the time displays in the
combo box or text box when using a command button.

Well, roll your own. If you want this time to be on today's date, you
could have a little utility table with one integer field with numbers
from 0 through 59. I routinely have such a table with values of a
field N from 0 through 10000, named NUM.

Base the Hours combo on a query selecting N < 24, and the Minutes
combo on a query selecting N < 60.

In the AfterUpdate event of each combo put code such as

Me!txtTimeField = Date() + TimeValue(cboHours, cboMinutes, 0)

No command button would be needed - it would automatically populate
the textbox txtTimeField with the selected time, and it would change
when the selection changes.

John W. Vinson[MVP]
 
Back
Top