Hello All, Thanks for what you do
I have a form that has 30 labels for the underlying fields. I use onClick to place a one in the table and on the label to show it's been checked, a second check removes the one, enter saves the record as long as at least one check has been made.
I have a single zoombox to enter comments that opens onclick and closes on a second click.
The enter key is set to save the record after checks have been made.
Everything works great except the enter key in the zoombox. I would like both the enter key and on click to close the textbox rather than save the record when the textbox has focus. As it is, the enter key does save the record but the box remains open. This is how the code is: (Thanks to missinglink)
Private Sub Form_Load()
'Make the textbox invisible on loading the form
Zoombox.Visible = False
End Sub
Private Sub OTHER___ENTER_COMMENT_Click()
'When you click the field, make the ZoomBox
'visible and move the cursor to the end of the text
Zoombox.Visible = True
Zoombox.SetFocus
'Zoombox.SelStart = Len(Me.Zoombox)
End Sub
Private Sub Zoombox_Click()
'Click the ZoomBox to close it and
'return to your original field
Me.OTHER___ENTER_COMMENT.SetFocus
Zoombox.Visible = False
End Sub
I have a form that has 30 labels for the underlying fields. I use onClick to place a one in the table and on the label to show it's been checked, a second check removes the one, enter saves the record as long as at least one check has been made.
I have a single zoombox to enter comments that opens onclick and closes on a second click.
The enter key is set to save the record after checks have been made.
Everything works great except the enter key in the zoombox. I would like both the enter key and on click to close the textbox rather than save the record when the textbox has focus. As it is, the enter key does save the record but the box remains open. This is how the code is: (Thanks to missinglink)
Private Sub Form_Load()
'Make the textbox invisible on loading the form
Zoombox.Visible = False
End Sub
Private Sub OTHER___ENTER_COMMENT_Click()
'When you click the field, make the ZoomBox
'visible and move the cursor to the end of the text
Zoombox.Visible = True
Zoombox.SetFocus
'Zoombox.SelStart = Len(Me.Zoombox)
End Sub
Private Sub Zoombox_Click()
'Click the ZoomBox to close it and
'return to your original field
Me.OTHER___ENTER_COMMENT.SetFocus
Zoombox.Visible = False
End Sub