ccguillermo
New member
- Local time
- Yesterday, 19:45
- Joined
- Nov 18, 2013
- Messages
- 9
Hi
I creae this code to update one field but it does not work in the way should be some body can help me what is wrong with this code. I get the same Answers "No Date In Boths Fields"
when I enter the information to my form
'this process update the Visibility Status
'If Date_Submitted_To_CMS = "" and Date_CMS_Approved =""
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (IsNull(Me.Date_Submitted_To_CMS0)) Or (IsNull(Me.Date_CMS_Approved)) Then
Me.Visibility_Status.Value = "Not Processed"
MsgBox "No Date In Boths Fields"
ElseIf (Not IsNull(Me.Date_Submitted_To_CMS)) Or (IsNull(Me.Date_CMS_Approved)) Then
Me.Visibility_Status.Value = "In Process"
MsgBox "There is date in the first but not in the second field"
ElseIf (Not IsNull(Me.Date_Submitted_To_CMS)) Or (Not IsNull(Me.Date_CMS_Approved)) Then
Me.Visibility_Status.Value = "Complete"
MsgBox "There is date in the first in the second too"
Else
Cancel = True
Me.Visibility_Status.SetFocus
MsgBox "me sacaron"
End If
End Sub
attached do you find my table an my form
Thank you very mcuh for you help
Calucho:banghead:
I creae this code to update one field but it does not work in the way should be some body can help me what is wrong with this code. I get the same Answers "No Date In Boths Fields"
when I enter the information to my form
'this process update the Visibility Status
'If Date_Submitted_To_CMS = "" and Date_CMS_Approved =""
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (IsNull(Me.Date_Submitted_To_CMS0)) Or (IsNull(Me.Date_CMS_Approved)) Then
Me.Visibility_Status.Value = "Not Processed"
MsgBox "No Date In Boths Fields"
ElseIf (Not IsNull(Me.Date_Submitted_To_CMS)) Or (IsNull(Me.Date_CMS_Approved)) Then
Me.Visibility_Status.Value = "In Process"
MsgBox "There is date in the first but not in the second field"
ElseIf (Not IsNull(Me.Date_Submitted_To_CMS)) Or (Not IsNull(Me.Date_CMS_Approved)) Then
Me.Visibility_Status.Value = "Complete"
MsgBox "There is date in the first in the second too"
Else
Cancel = True
Me.Visibility_Status.SetFocus
MsgBox "me sacaron"
End If
End Sub
attached do you find my table an my form
Thank you very mcuh for you help
Calucho:banghead:
Last edited: