S
shellsusenetgroups
Hello,
I have a form that I have created that has an OnClose event. The
event opens a new form (fShowIncidentID) which gives the user their
incident number for what they have just entered. However, is a user
just opens the form and closes without doing any entry, then they get
my fShwoIncidentID with no incident number because no record was
saved. I would like to suppress my fShowIncidentID form if the user
did not enter any data. Is that possible? Thanks in advance!!
Here is my current code for the close event:
Private Sub Form_Close()
On Error GoTo Err_Command112_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fShowIncidentID"
stLinkCriteria = "[Incident Number]=" & "'" & Me![Text42] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command112_Click:
Exit Sub
Err_Command112_Click:
MsgBox Err.Description
Resume Exit_Command112_Click
End Sub
I have a form that I have created that has an OnClose event. The
event opens a new form (fShowIncidentID) which gives the user their
incident number for what they have just entered. However, is a user
just opens the form and closes without doing any entry, then they get
my fShwoIncidentID with no incident number because no record was
saved. I would like to suppress my fShowIncidentID form if the user
did not enter any data. Is that possible? Thanks in advance!!
Here is my current code for the close event:
Private Sub Form_Close()
On Error GoTo Err_Command112_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fShowIncidentID"
stLinkCriteria = "[Incident Number]=" & "'" & Me![Text42] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command112_Click:
Exit Sub
Err_Command112_Click:
MsgBox Err.Description
Resume Exit_Command112_Click
End Sub