473,396 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Use query to populate a table

I've built a series of queries that bring together and process data from several different tables and queries and at the end a single query returns a single record based on a selection made in a form.

I've built myself into a bit of a bind, however, in that the queries begin by referencing the value in a control in the form, and the form itself is based on the query. This circular setup is not working. Obviously.

In order to better accomplish my goals, I'm thinking it may be better to use the queries to populate a table with the appropriate data and then build the form from that table. This would mean less processing as I use the form, quicker db response, and much easier form construction.

The problem is that I'm not sure where to start in modifying my queries and/or what VBA it may be necessary to employ to make this work.

Currently the initial query, qryPrintCostAssets, returns a record from tblAssets based on the selection in forms!formPrinterCost!listPrinters. The final query, qryPrintCostMaster, returns all the data I want correctly and with all necessary processing completed simply runs based on qryPrintCostAssets.AssetID pulling from several other data processing queries. Running this query triggers all the other queries to process in turn.

I'd like to modify the entire string of queries to run for each record returned by qryPrinter, which is simply a list of the printers pulled from tblAssets.

I assume the only queries that may need modification would be the last, qryPrintCostMaster, and possibly the first, qryPrintCostAssets. And the modifications would probably be based on the WHERE and FROM statements.

Can a query be built that will do all this updating itself or should I employ VBA and use a FOR loop to run the queries upon command, updating the table.

Using the various Event triggers, I assume the best time to run all this is when I open formPrinterCost.

Do you have any tips or information you think would benefit me in this endeavor?
Sep 1 '10 #1
1 4570
I resolved this issue by generalizing the SELECT statement and removing the WHERE clause.

Now qryPrintCostMaster returns all records correctly modified in a neat table.
Sep 1 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Muzamil | last post by:
hello I've a denormalized table PRODUCTS with following fields: ProductNo , OrderNo , SerialNo , OrderDate , PromiseDate ,
0
by: leavandor | last post by:
I am trying to design a query that works with a relationship between a Table and a Query. I am comparing a value in the table with a computed value inside the query. The reason for this is that...
3
by: Rodríguez Rodríguez, Pere | last post by:
Hello, I think I have found a query problem when the query has an alias for a table and use alias item and table name. I ilustrate the problem with a simple table and query. prr=# create...
2
by: mpmason14 | last post by:
i know there is a way to populate one combobox based on another, but i've never done it myself and am looking for some help. i have a table that has SwitchNo and NumberofPorts as two columns. i...
1
by: robert.waters | last post by:
Is there any way to identify a record based on where the user's cursor is located, if the cursor is located somewhere in a query or table window? I would like to have a commandbar button call a...
4
by: Nate | last post by:
I am looking to populate a Schedule table with information from two other tables. I am able to populate it row by row, but I have created tables that should provide all necessary information for me...
2
by: gpo | last post by:
I've got a table with duplicates, and I want to query the table without duplicates. my table :HOUSE column : Name col2 :DOA col3 : Postcode How is it done?
3
by: Aric Green | last post by:
I have a form that contains customer information. I want to use the ID_NUMBER to query another table (when I click a button) to return the record that matches that ID_NUMBER. What is the easiest...
2
by: mburns | last post by:
Hello all- I was wondering if it is possible to link an Access query or table to a Word document and pull specific information into Word by manually entering a unique identifier, which would then...
1
by: philqw78 | last post by:
Is it possible to attach a command to the closing of a query or table. My simple access database needs to stay simple, since I am. So I don't want to create a lot of forms that can complete VBA...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.