X
xg
Right after my "Is not valid Section" message, there is another Access
standard message popup. How to suppress it?
Thanks.
Private Sub Sect_BeforeUpdate(Cancel As Integer)
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("Course")
rst.FindFirst "[sem]&[sect] = '" & Me.Sem & Me.Sect & "'"
If rst.NoMatch Then
MsgBox Me.Sect & " Is not valid Section"
Cancel = True
Else
Me.Subj = rst![Subj]
Me.No = rst![No]
Me.Lt = rst![Lt]
End If
Set rst = Nothing
Exit_sect_BeforeUpdate:
Exit Sub
Err_sect_BeforeUpdate:
MsgBox Err.Description
Resume Exit_sect_BeforeUpdate
End Sub
standard message popup. How to suppress it?
Thanks.
Private Sub Sect_BeforeUpdate(Cancel As Integer)
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("Course")
rst.FindFirst "[sem]&[sect] = '" & Me.Sem & Me.Sect & "'"
If rst.NoMatch Then
MsgBox Me.Sect & " Is not valid Section"
Cancel = True
Else
Me.Subj = rst![Subj]
Me.No = rst![No]
Me.Lt = rst![Lt]
End If
Set rst = Nothing
Exit_sect_BeforeUpdate:
Exit Sub
Err_sect_BeforeUpdate:
MsgBox Err.Description
Resume Exit_sect_BeforeUpdate
End Sub