G
Guest
I have a command button on a form that opens a pop-up form. When the command
button is clicked it stays depressed until it is used again. I have tried
refreshing and repainting the form after the pop-up form closes. Here's the
code:
Private Sub NMFind_Click()
On Error GoTo Err_NewAssetBtn_Click
Dim stDocName As String
'open form to find NM
If IsNull(Me!EquipTransaction) Then
stDocName = "NMForm"
'open the form
DoCmd.OpenForm stDocName, _
windowmode:=acDialog
End If
'wait for the form to be closed
If IsLoaded("NMForm") Then
DoCmd.Close acForm, "NMForm"
End If
Exit_NewAssetBtn_Click:
Exit Sub
Err_NewAssetBtn_Click:
MsgBox Err.Description
Resume Exit_NewAssetBtn_Click
End Sub
button is clicked it stays depressed until it is used again. I have tried
refreshing and repainting the form after the pop-up form closes. Here's the
code:
Private Sub NMFind_Click()
On Error GoTo Err_NewAssetBtn_Click
Dim stDocName As String
'open form to find NM
If IsNull(Me!EquipTransaction) Then
stDocName = "NMForm"
'open the form
DoCmd.OpenForm stDocName, _
windowmode:=acDialog
End If
'wait for the form to be closed
If IsLoaded("NMForm") Then
DoCmd.Close acForm, "NMForm"
End If
Exit_NewAssetBtn_Click:
Exit Sub
Err_NewAssetBtn_Click:
MsgBox Err.Description
Resume Exit_NewAssetBtn_Click
End Sub