Below is what I am working with...
I need to warn the user to save the record (if the controls have data in them) before they close out of the form, otherwise if the form is blank (or all the contols contain null data), then just close the form...
I just can't get this to work...!!! Any suggestions or examples..??
For Each ctrl In Me.Controls
If ctrl.ControlType = acTextBox Or ctrl.ControlType = acComboBox Then
If IsNull(ctrl) Then
Forms![MainMenu].Visible = True
Exit Sub
End If
Else
DisplayMessage "This delay has not been saved...!!!" & vbCrLf & "Either click on 'Add Delay' to add this delay event" & vbCrLf & "OR - click on 'Clear' to clear the form out before going to the Main Menu"
End If
Next ctrl
I need to warn the user to save the record (if the controls have data in them) before they close out of the form, otherwise if the form is blank (or all the contols contain null data), then just close the form...
I just can't get this to work...!!! Any suggestions or examples..??
For Each ctrl In Me.Controls
If ctrl.ControlType = acTextBox Or ctrl.ControlType = acComboBox Then
If IsNull(ctrl) Then
Forms![MainMenu].Visible = True
Exit Sub
End If
Else
DisplayMessage "This delay has not been saved...!!!" & vbCrLf & "Either click on 'Add Delay' to add this delay event" & vbCrLf & "OR - click on 'Clear' to clear the form out before going to the Main Menu"
End If
Next ctrl