Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button on form won't come back up

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
I have a Form, which contains buttons, when they are press they do an error check first to see if the 2 of the fields above are NULL, if they are they give out an Error MsgBox.

But the problem is, once you click "OK" on the MsgBox, the MsgBox goes away but the button doesn't go back up, it stays on the "clicked" position.

I can't figure out whats wrong, is there someway to force the form to refresh or something, i tried
"form!form_name.refresh " but it doesn't work.

Here's my code:
------------------------------------------------------------
Private Sub Field151_Click()

Dim ar_file As String
Dim temp As String, temp2 As String
Dim myDB As Database
Dim Workset As Recordset
Dim rsLastSession As Recordset
Dim lLastSession As Long

If IsNull(Forms!Session_parameters.ORDER_PROBABILITY) Then
MsgBox "Please specify an Order Probability."
Exit Sub
End If

If IsNull(Forms!Session_parameters.PERIOD_PROBABILITY) Then
MsgBox "Please specify a Period Probability."
Exit Sub
End If

-----------------------------------------------------------

Any help is appreciated! thanks1
 
Hi Jason, sounds to me like you're using a "toggle button" which is down or up when you might be better using a "command button" which always springs back...
Oh, below:

Dim ar_file As String
Dim temp As String, temp2 As String
Dim myDB As Database
Dim Workset As Recordset
Dim rsLastSession As Recordset
Dim lLastSession As Long

is not required according to your displayed code. ;-) Gord
ghubbell@total.net
 
Hey! Thanks!

Thats did it! I am modifying modifying some else's code, and i didn't realize he use a toggle button.

Thanks a million!

Jayson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top