Current Event

  • Thread starter Thread starter bw
  • Start date Start date
B

bw

In the Current Event procedure of a Form, I perform a check and then display a MSGBOX
message. For example, If [RecNum]=1 then Msgbox "This is " & [RecNum]

This message is displayed BEFORE the current record is visible. For example, if the
message is suppose to be displayed on the first record, I get the message on a blank
screen, before the Form is visible.

How do I get the Form to be visible, and then display the message?

Thanks,
Bernie
 
Private boolShowMessage as Boolean

Private Sub SomeControl_GotFocus()
If boolShowMessage = True Then
'Add message code
boolShowMessage = False
End If
End Sub

Private Sub Form_Current()
boolShowMessage = True
End Sub

N.B. Some control needs to be the first control which first receives the
focus when the form is loaded or a record navigated (has a tab index of 0 or
1).
 
James...

Your suggestion approches what I want to do, however, it seems that the
"SomeControl_GotFocus() event IS NOT what I want. This would only work if that
specific control had the focus. If the user selected a different control, and then "Paged
Down" through each record, the specific control would never get the focus.

I tried this using the Form_GotFocus(), but this doesn't seem to work for some reason.

Do you have another suggestion?

Thanks for your help,
Bernie

Private boolShowMessage as Boolean

Private Sub SomeControl_GotFocus()
If boolShowMessage = True Then
'Add message code
boolShowMessage = False
End If
End Sub

Private Sub Form_Current()
boolShowMessage = True
End Sub

N.B. Some control needs to be the first control which first receives the
focus when the form is loaded or a record navigated (has a tab index of 0 or
1).


--
James Goodman
MCSE MCDBA
http://www.angelfire.com/sports/f1pictures/
bw said:
In the Current Event procedure of a Form, I perform a check and then display a MSGBOX
message. For example, If [RecNum]=1 then Msgbox "This is " & [RecNum]

This message is displayed BEFORE the current record is visible. For example, if the
message is suppose to be displayed on the first record, I get the message on a blank
screen, before the Form is visible.

How do I get the Form to be visible, and then display the message?

Thanks,
Bernie
 
Back
Top