vbaNet,
Sorry not to get back to you earlier. I have been busy the last couple days. Here is what I came up with. Two different ways of doing it in the attachment.
Note the AirOpsForm on the Example attachment from previous...I added the code below and when Fifteen is checked it will ask for a parameter, if you type in the Side (100 Bounty) the FifteenQuery (Update Query) will run and it did what I wanted for a limited time...for some reason it has stopped?? However, I do not want to pimp the user for the parameter since it is already in the AirOpsForm.
After extensive research...and pounding my head against the wall for the last 6 hours I tried different code in the Airborne AfterUpdate in attempt to auto fill the parameter. Unfortunately I am not able to make it work. What am I missing here?
Respectfully and very thankful for your help,
la1814
Sorry not to get back to you earlier. I have been busy the last couple days. Here is what I came up with. Two different ways of doing it in the attachment.
Note the AirOpsForm on the Example attachment from previous...I added the code below and when Fifteen is checked it will ask for a parameter, if you type in the Side (100 Bounty) the FifteenQuery (Update Query) will run and it did what I wanted for a limited time...for some reason it has stopped?? However, I do not want to pimp the user for the parameter since it is already in the AirOpsForm.
After extensive research...and pounding my head against the wall for the last 6 hours I tried different code in the Airborne AfterUpdate in attempt to auto fill the parameter. Unfortunately I am not able to make it work. What am I missing here?
Respectfully and very thankful for your help,
la1814
Code:
Private Sub Airborne_AfterUpdate()
Dim qdf As DAO.QueryDef
Dim prmOne As DAO.Parameter
Dim rst As Recordset
'open query
Set qdf = db.QueryDefs("AirborneQuery")
'link Parameters to the query
Set prmOne = qdf.Parameters!param_one
'set the values of the parameters
prmOne = Me.Form!AirOpsForm!Side
Set rst = qdf.OpenRecordset(dbOpenDynaset, dbSeeChanges)
Set rst = Nothing
Set prmOne = Nothing
Set qdf = Nothing
End Sub
Private Sub Fifteen_AfterUpdate()
If Fifteen Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "FifteenQuery"
DoCmd.SetWarnings True
Else
End If
End Sub