I'm trying to run a query based on the values on a text box in a form, i had this working then i changed something and now it doesn't work and i can't remember what i did to make it stop working.
Private Sub cmdJobCompleteButton_Click()
Me.Visible = False
DoCmd.OpenQuery "qryJobsCompletedJob", acViewNormal, acEdit
'DoCmd.Close acForm, "frmWorkOrders", acSaveYes
' DoCmd.Close acQuery, "qryJobsCompletedJob", acSaveNo
DoCmd.OpenReport "rptJobsCompletedJob", acViewReport, , , acDialog
End Sub
I have in the query criteria [Forms]![frmJobs]![txtJobNumber]
txtJobNumber is hold the value i want to use as the criteria, and yes i have check the spelling on everthing and it's correct.
when i click the button it runs the query and opens the report but the query doesn't bring in any records.
Please help.
Private Sub cmdJobCompleteButton_Click()
Me.Visible = False
DoCmd.OpenQuery "qryJobsCompletedJob", acViewNormal, acEdit
'DoCmd.Close acForm, "frmWorkOrders", acSaveYes
' DoCmd.Close acQuery, "qryJobsCompletedJob", acSaveNo
DoCmd.OpenReport "rptJobsCompletedJob", acViewReport, , , acDialog
End Sub
I have in the query criteria [Forms]![frmJobs]![txtJobNumber]
txtJobNumber is hold the value i want to use as the criteria, and yes i have check the spelling on everthing and it's correct.
when i click the button it runs the query and opens the report but the query doesn't bring in any records.
Please help.