I have a query that uses a form field as the query criteria. I want the query to execute without the prompt for the criteria.
This is the sql of the query:
Expand|Select|Wrap|Line Numbers
- SELECT FldRptsQueryPt1.*, FldRptsQueryPt1.rmsDetails.rmsNumber
- FROM FldRptsQueryPt1 LEFT JOIN OffensesQuery ON FldRptsQueryPt1.rmsDetails.rmsNumber = OffensesQuery.Offenses_rmsNumber
- WHERE (((FldRptsQueryPt1.rmsDetails.rmsNumber)=[Forms]![rmsDetails]![rmsNumber]));
Expand|Select|Wrap|Line Numbers
- Application.ExportXML _
- ObjectType:=acExportQuery, _
- DataSource:="FldRptsQuery", _
- DataTarget:="C:\FldRptsQuery.xml"
From the query window the query works when the form rmsDetails is open.
When I use the button on the form I get the prompt to supply the rmsNumber and then the data is exported. I would like to get rid of the prompt for the rmsNnumber.
I'm new to access so I don't know if I'm using the right approach for this situation.
Thanks you.