Query not updating report!

Joshinkii

New member
Local time
, 19:07
Joined
Oct 25, 2013
Messages
8
Hey guys, I am really stressing out about the above, When I update my query my report does not update to the new changes although the query is correct.

So i have my query 1 which looks like this;
puu.sh/6YgYK.png

Now in my report after I have changed, for example the customer order number It does not show the updated query values. When I visit the RecordSource of the report I still have my old SQL string in there;

SELECT tblJobsDatabase.ID, tblJobsDatabase.[Customer Order], tblJobsDatabase.[Customer Line], tblJobsDatabase.[Customer Name], tblCustomerDetails.[Customer Address], tblCustomerDetails.[Purchaser Name], tblJobsDatabase.[Part Number], tblJobsDatabase.Description, tblJobsDatabase.Qty, tblJobsDatabase.DrawingNumber FROM tblCustomerDetails INNER JOIN tblJobsDatabase ON tblCustomerDetails.[Customer Name] = tblJobsDatabase.[Customer Name] WHERE (((tblJobsDatabase.[Customer Order])="1234") AND ((tblJobsDatabase.[Customer Line]) In (1,2,3,4)) AND ((tblJobsDatabase.[Customer Name]) Like "Microsof*"));

The only way It wil update is if I go into Report > Edit > RecordSource > Query Builder and change it manually.

If there a way to get around this? So I can update my Query and report updates with it? Or can I create a Macro for it to go straight to the query builder page within the report?

Thanks for reading guys!
 
Is your query a saved query? It has a name eg MyQuery.

If you have the report recordsource = Myquery, then, if and when you change and save MyQuery, the latest saved version of MyQuery should apply to the report.
That's my understanding. You don't filter the report elsewhere, right?
 
Hey Jdraw, thank you for your time.

Yes it is a saved query, Obviously I want to be able to change values in the query to suit my requirements, I did create the Report using Report Wizard & change the layout after.

In my Reprot RecordSource the text in my first post is what is visible, If I change the RecordSource to my Query it throws up messageboxes for the missing text.
 
I just went to one of my saved queries and used report wizard. The Recordsource shows the named query, see the attached.
 

Attachments

  • ReportRecordSource_NamedQuery.jpg
    ReportRecordSource_NamedQuery.jpg
    100.2 KB · Views: 89
I fixed it :)

I changed the RecordSource to the Query I had saved, then the missing information I just added tables to the query + it worked :)

Thanks!
 

Users who are viewing this thread

Back
Top Bottom