J
Junior
I have this code in clik event of a form
If not .EOF then the form opens but the program keeps running
how can i change my code to open the form and stop any further action until
the form is closed
Dim rst As dao.Recordset
Dim sxSQL As String, strErr As String
strErr = "OK"
sxSQL = "SELECT TOP 1 SOC FROM QFindCstOrgErr "
Set rst = CurrentDb.OpenRecordset(sxSQL)
With rst
DoCmd.SetWarnings False
If Not .EOF Then
DoCmd.OpenForm "frmCstOrgErr", acNormal, "", "", acEdit, acNormal
Else: MsgBox "No CstOrg errors were found - press ok to continue"
End If
Set rst = Nothing
more code.......
End With
If not .EOF then the form opens but the program keeps running
how can i change my code to open the form and stop any further action until
the form is closed
Dim rst As dao.Recordset
Dim sxSQL As String, strErr As String
strErr = "OK"
sxSQL = "SELECT TOP 1 SOC FROM QFindCstOrgErr "
Set rst = CurrentDb.OpenRecordset(sxSQL)
With rst
DoCmd.SetWarnings False
If Not .EOF Then
DoCmd.OpenForm "frmCstOrgErr", acNormal, "", "", acEdit, acNormal
Else: MsgBox "No CstOrg errors were found - press ok to continue"
End If
Set rst = Nothing
more code.......
End With