Retrieve a value from a query field

Skip Bisconer

Who Me?
Local time
Today, 12:54
Joined
Jan 22, 2008
Messages
285
I would like to populate a field in a form based on a table and have it's value come from a query thats not part of the forms record set. Is that possible?

To clarify I have a query that provides the average unit sales. I have a table of inventory items the buyer looks at to determine a recommended buy amount that have computations that require the amount developed in the average month query as part of some of the calculations.

Every thing I have tried so far has failed to produce the desired results. The problems I am experiencing is that if I tie the inventory table to the query I lose all the inventory part numbers that have not had any sales. The buyer needs to look at all the inventory items for that vendor.

I have tried an update query to add the average units to the table in that manner but I can't make it work because, I believe, the field I need to update from is a calculated field, the sum of eight fields divided by 8.

I have run out of ideas.
 
The simplest way would be a DLookup function. You may also play with the joins on your query. If you edit the join in design view, you'll see options like "Select all values from table xyz..". See if the appropriate join fixes your query. In SQL view, it would look something like:

FROM InventoryTable LEFT JOIN YourQueryName ON...
 

Users who are viewing this thread

Back
Top Bottom