I have two forms. When I enter a textbox on the first form and enter a date and exit the text box (on exit event), it opens up the second form, which already has previously entered data in it. Upon entering this second form, I would like to automatically change one of the fields from a "Yes" to a "No."
Any ideas on how I could achieve this. I would really appreciate some help. Thanks for your time.
here is my code: The line with the asterix is where I try to change the staus from a yes to a no, but that part does not work. BTW there are two forms, not a form and a subform.
Any ideas on how I could achieve this. I would really appreciate some help. Thanks for your time.
here is my code: The line with the asterix is where I try to change the staus from a yes to a no, but that part does not work. BTW there are two forms, not a form and a subform.
Code:
Private Sub Filing_Date_Exit(Cancel As Integer)
If Not IsNull(Filing_Date) Then
Me.Status.Value = "No"
query = "select * from [All Data Inv Discl] where ID in (select IID from IIDD where DID = " & Me.ID & ")"
On Error Resume Next
With CurrentDb
.QueryDefs.Delete ("UPDID")
Set qdfNew = .CreateQueryDef("UPDID", query)
.Close
End With
DoCmd.RunSQL query
DoCmd.OpenForm "Invention Disclosure Input Form", , , , , , "UpdateT"
[All Data Inv Discl].[Status] = "No" ******
End If
End Sub