Ideally I wanted the option not to run the query.
All I want is to stop the first "you are about to run an append query" message box and keep the second message box. I think I am going to do as Gasman suggests and create my own message box with a record count but i will attempt that when I have...
Correction, my statement above "If I run the query direct from the query I only get the second box" was incorrect. The query has to already be in design mode for you to only get one message box.
If I turn warnings off I lose both message boxes and I think the "you are about to append..." message box is useful.
I don't know how to / where to turn off just the first "you are about to run..." message box.
I have a button on a form which runs an append query. The button code is:
Private Sub cbUpdateRecords_Click()
On Error GoTo cbUpdateRecords_Click_Err
DoCmd.OpenQuery "qryFertApplnGroup", acViewNormal, acEdit
cbUpdateRecords_Click_Exit:
Exit Sub
cbUpdateRecords_Click_Err:
MsgBox Error$
Resume...
Just to finish off this thread I resolved this by adding a "select for printing" Yes/No button into the detail of the subform and then used that in the query behind the report.
The error is too few parameters.
INSERT INTO tblSLTrptFertApplnCharts ( FertApplnIndex ) SELECT qryUpdateFertApplns.ApplicationIndex FROM qryUpdateFertApplns WHERE (([Lookup_ProductName].[ProductName] Like "*olysulpha*")) AND ([qryUpdateFertApplns].[Variety] Like "*ham Win*")
There was nothing in the Immediate window and I couldn't understand why. Then I noticed there was a typing error in the Debug.Print command.
Here is the text
INSERT INTO tblSLTrptFertApplnCharts ( FertApplnIndex ) SELECT qryUpdateFertApplns.ApplicationIndex FROM qryUpdateFertApplns WHERE
How do I find Me.Filter value? Would it be in the Property sheet? If so here are a couple of examples.
(([Lookup_ProductName].[ProductName] Like "*N. 34.5*")) AND ([Lookup_ApplicationTiming].[ApplicationTiming] Like "*umn seed*")
([qryUpdateFertApplns].[FieldName] Like "*unt Plea*")
Using your code:
Dim strSql As String
strSql = "INSERT INTO tblSLTrptFertApplnCharts ( FertApplnIndex ) SELECT qryUpdateFertApplns.ApplicationIndex FROM qryUpdateFertApplns "
strSql = strSql & " WHERE " & Me.Filter
Debug.Print strql
'if that does not work go into immediate window and post...
Hi MajP, how would I do that please? This is my append query
INSERT INTO tblSLTrptFertApplnCharts ( FertApplnIndex )
SELECT qryUpdateFertApplns.ApplicationIndex
FROM qryUpdateFertApplns;
Good morning, I have a main form with a subform. The subform is a continuous form which is filtered from the main form. I then use the inbuilt Access Filters (right click in the text box) to narrow down the records shown in the subform.
Once the records are filtered down I would like to copy...
On this particular form there is already data in the combobox. If all of the text is not selected and I type "br" for example then the br just gets inserted into the combobox with the existing text. If all text is selected then typing "br" triggers FAYT.