M
MBoozer
I took the advice of the experts in the group and made sure all my forms are
set to "Option Explicit" before distributing the db. Even though I did it
after the fact, I only have one error on compile and can't figure out what it
is: The editor highlights the RetValue on the sedcond line saying variable
not defined. I have no idea what this means except that it is not good. Any
help? Thanks.
Private Sub EditRecord_Click() 'Make the Form Editable'
RetValue = MsgBox("Warning:" & vbCrLf & "Editing a Chemical Name will change
the name of all existing records for that name. Do you wish to continue?",
vbExclamation + vbYesNoCancel, "Edit Chemical Name")
If RetValue = 6 Then
Me.AllowEdits = True 'Allow Edits To Data'
Me.ChemName.SetFocus 'Place cursor into FieldName'
ElseIf RetValue = 2 Then 'Cancel Event for Cancel Button'
DoCmd.CancelEvent
ElseIf RetValue = 7 Then 'Cancel Event For No Button'
DoCmd.CancelEvent
End If
End Sub
set to "Option Explicit" before distributing the db. Even though I did it
after the fact, I only have one error on compile and can't figure out what it
is: The editor highlights the RetValue on the sedcond line saying variable
not defined. I have no idea what this means except that it is not good. Any
help? Thanks.
Private Sub EditRecord_Click() 'Make the Form Editable'
RetValue = MsgBox("Warning:" & vbCrLf & "Editing a Chemical Name will change
the name of all existing records for that name. Do you wish to continue?",
vbExclamation + vbYesNoCancel, "Edit Chemical Name")
If RetValue = 6 Then
Me.AllowEdits = True 'Allow Edits To Data'
Me.ChemName.SetFocus 'Place cursor into FieldName'
ElseIf RetValue = 2 Then 'Cancel Event for Cancel Button'
DoCmd.CancelEvent
ElseIf RetValue = 7 Then 'Cancel Event For No Button'
DoCmd.CancelEvent
End If
End Sub