C
crtopher
I have a series of fields that record a series of times. On my form I'd like
each field in succession to have the current time entered into it and then
move to the next field all with a simple press of the enter button.
Currently i have a button on the form labelled "now" that enters the current
time in whatever field i have the cursor in using the following code:
Application.Screen.PreviousControl.SetFocus
Me.ActiveControl = Time()
This works well. I have even set its default to "yes" so that when i hit
'enter' the current time is recorded. The problem is that even though i have
the enter key behaviour set to go to the next field via the menu option, it
wont do it when the buttons default is set to yes.
Do i need another line in my code to force the next control to get the focus?
I have read all the forums about changing enter key behaviour as well as
ansi code for the key press event but cant seem to do what i need to do.
Thanks in advance
each field in succession to have the current time entered into it and then
move to the next field all with a simple press of the enter button.
Currently i have a button on the form labelled "now" that enters the current
time in whatever field i have the cursor in using the following code:
Application.Screen.PreviousControl.SetFocus
Me.ActiveControl = Time()
This works well. I have even set its default to "yes" so that when i hit
'enter' the current time is recorded. The problem is that even though i have
the enter key behaviour set to go to the next field via the menu option, it
wont do it when the buttons default is set to yes.
Do i need another line in my code to force the next control to get the focus?
I have read all the forums about changing enter key behaviour as well as
ansi code for the key press event but cant seem to do what i need to do.
Thanks in advance