BrettM
just a pert, "ex" to come
- Local time
- Today, 16:43
- Joined
- Apr 30, 2008
- Messages
- 134
I am creating a simple Timesheet that will require users to select their start and finish times etc from a ComboBox which will give them selection options in 15 minute intervals. I want to fill the ComboBox selections automatically with a common Function call.
My problem is that I am having difficulty passing the ComboBox name to the Function. Can anyone tell me what is wrong please?
The Function is...
And I am attempting to call it from the On Enter event of the ComboBox as
I keep getting "Object Required" when I enter the ComboBox. Is my logic wrong?
My problem is that I am having difficulty passing the ComboBox name to the Function. Can anyone tell me what is wrong please?
The Function is...
Code:
Public Function FillComboTime(ctlCombo As ComboBox)
For i = 0 To 95
ctlCombo.AddItem Item:=Format(0 / #12:15:00 AM# * #12:15:00 AM# + i * #12:15:00 AM#, "HH:MM"), Index:=i
Next i
End Function
And I am attempting to call it from the On Enter event of the ComboBox as
Code:
Private Sub Login1_Enter()
FillComboTime (Me.Login1)
End Sub
I keep getting "Object Required" when I enter the ComboBox. Is my logic wrong?