Query Doesn't see Changes to Tables

J

Jeff Boyce

Please post the SQL statement of the (old) query.

I suspect "changed some data in the source tables" actually means "changed
some fields..." (and not the data contained therein).

Changing field contents shouldn't affect the query.

Changing field definitions (e.g., adding new fields) could ...

Show us the SQL...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
S

S.Clark

A query will use the latest data in the table. So, it becomes a question of
timing. When did the record commit vs. running the query? Experiment, but
don't waste time recreating the query.
 
T

Tara Metzger

I deleted the tables in question from the query and added them back. This time when I ran the query the new data was picked up. How can I prevent this from happening next time?

Thank you.



Tara wrote:

Query Doesn't see Changes to Tables
21-Oct-09

I have a query with multiple tables that ran fine until I changed some data in the source tables. Now the changes aren't being taken into account when I re-run the query. Is there a particular reason for this? Should I create a new query?

Thank you.

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
XCeed Streaming Compression Library
http://www.eggheadcafe.com/tutorial...f-769ec7085cf2/xceed-streaming-compressi.aspx
 
D

Duane Hookom

S. (Steve?) Clark provided a great answer. If the records are saved in the
table, they will show in the query results. If a record hasn't be
saved/committed it won't display in another query or form based on the query.
 
J

Jeff Boyce

Is there a chance that you are merely "looking" at the query results after
adding records, instead of re-running the query?

If you don't tell Access to take another look (i.e., re-run the query),
Access uses what it already found.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
T

Tara Metzger

Jeff,

I apologize for taking so long to get this to you. The SQL statement of the old query is below. Let me know what you think.

SELECT tblYdstckTechInfoRelevance.ClassID AS ID, tblClasses.ClassTitle AS Title, tblYardstick.LocationID, tblLocation.LocationName AS Location, tblYdstckTechInfoRelevance.TieIn AS TieIn, tblYdstckTechInfoRelevance.ProgramNo AS Prog, tblYdstckTechInfoRelevance.TechInfoID AS [Q#], tblYdstckCriteriaTechInfo.TechInfoRelatedProgram AS Q, tblYdstckTechInfoRelevance.YNL AS [Value], tblYardstickYesNo.YNL AS YNL
FROM tblYdstckCriteriaTechInfo INNER JOIN ((tblYardstickYesNo INNER JOIN (tblYdstckTechInfoRelevance INNER JOIN tblClasses ON tblYdstckTechInfoRelevance.ClassID = tblClasses.ClassID) ON tblYardstickYesNo.ID = tblYdstckTechInfoRelevance.YNL) INNER JOIN (tblLocation RIGHT JOIN tblYardstick ON tblLocation.LocationID = tblYardstick.LocationID.Value) ON (tblYdstckTechInfoRelevance.ProgramRelTechInfoID = tblYardstick.ProgramRelevTechInfoID.Value) AND (tblClasses.ClassID = tblYardstick.ClassID)) ON tblYdstckCriteriaTechInfo.TechInfoRelatedProgramID = tblYdstckTechInfoRelevance.TechInfoID
ORDER BY tblYdstckTechInfoRelevance.TechInfoID;


Thank you,
Tara



Jeff Boyce wrote:

Please post the SQL statement of the (old) query.
21-Oct-09

Please post the SQL statement of the (old) query

I suspect "changed some data in the source tables" actually means "change
some fields..." (and not the data contained therein)

Changing field contents should not affect the query

Changing field definitions (e.g., adding new fields) could ..

Show us the SQL..

Regard

Jeff Boyc
Microsoft Access MV

-
Disclaimer: This author may have received products and services mentione
in this post. Mention and/or description of a product or service herei
does not constitute endorsement thereof

Any code or psuedocode included in this post is offered "as is", with n
guarantee as to suitability

You can thank the FTC of the USA for making this disclaime
possible/necessary.

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Wise for Visual Studio .NET
http://www.eggheadcafe.com/tutorial...39-75a1f1aae2e2/wise-for-visual-studio-n.aspx
 
T

Tara Metzger

S. Clark,

Thank you for the reply. I closed the query to make the changes to the data in the table. Then opened the query (which I thought runs the query) it to make sure it picked up the changes.



S.Clark wrote:

A query will use the latest data in the table.
21-Oct-09

A query will use the latest data in the table. So, it becomes a question of
timing. When did the record commit vs. running the query? Experiment, but
do not waste time recreating the query.

:

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
Creating A Custom XML Web Control
http://www.eggheadcafe.com/tutorial...6-3399ea946e75/creating-a-custom-xml-web.aspx
 
T

Tara Metzger

Jeff,

It is very possible that I didn't actually re-run the query when I thought I had done so. At some point I clicked on the "run" button in the design tab, to no avail. The new data in the table didn't appear. I'm sure it's user error, but I'm not sure what I did or didn't do.

Thank you,
Tara



Jeff Boyce wrote:

Is there a chance that you are merely "looking" at the query results
22-Oct-09

Is there a chance that you are merely "looking" at the query results after
adding records, instead of re-running the query?

If you do not tell Access to take another look (i.e., re-run the query),
Access uses what it already found.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Previous Posts In This Thread:

EggHeadCafe - Software Developer Portal of Choice
ADO.NET 3.5 Cookbook by Bill Hamilton [O'Reilly]
http://www.eggheadcafe.com/tutorial...99b-d2bd169f4974/adonet-35-cookbook-by-b.aspx
 
J

John W. Vinson

It is very possible that I didn't actually re-run the query when I thought I had done so. At some point I clicked on the "run" button in the design tab, to no avail.

The Run button executes an Action query (such as an Append query, Delete
query, etc.) - something which modifies data stored in a table. It has no
effect for a Select query which is just selecting records.

You can requery a Query datasheet by pressing F9. This will force Access to go
back to the tables and present the data that fits the query parameters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top