This is the set up:
[Text6] is a date field on a form. Its control source is
the field "date_enter ed" in"Table1". If there is a date showing
in the date_entered field (Text6) & the status in Combo box2
shows "deleted" then the after update event should delete the
date in Text6 & return the field "date_enter ed to a null value
when the form is closed. Even though the debug window shows
rst!date entered as null when you step through this event the
table still has the original value when you view it after the
form is closed.
Private Sub Form_AfterUpdat e()
If Me.Combo2.Colum n(0) <> "deleted" Then
Me.Text6.Enable d = True
Me.Text6 = ""
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordse t("table1", dbOpenTable)
rst.Edit
IsNull (rst!date_enter ed)
rst.Update
rst.close
Set db = Nothing
End If
End Sub
What am I missing???
I'm sure its something simple cause what am trying to do
is pretty basic but absolutely refuses to work in this form
Thanks for any guidance you can give me
dc
[Text6] is a date field on a form. Its control source is
the field "date_enter ed" in"Table1". If there is a date showing
in the date_entered field (Text6) & the status in Combo box2
shows "deleted" then the after update event should delete the
date in Text6 & return the field "date_enter ed to a null value
when the form is closed. Even though the debug window shows
rst!date entered as null when you step through this event the
table still has the original value when you view it after the
form is closed.
Private Sub Form_AfterUpdat e()
If Me.Combo2.Colum n(0) <> "deleted" Then
Me.Text6.Enable d = True
Me.Text6 = ""
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb()
Set rst = db.OpenRecordse t("table1", dbOpenTable)
rst.Edit
IsNull (rst!date_enter ed)
rst.Update
rst.close
Set db = Nothing
End If
End Sub
What am I missing???
I'm sure its something simple cause what am trying to do
is pretty basic but absolutely refuses to work in this form
Thanks for any guidance you can give me
dc
Comment