Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Data into form and add second query. 1

Status
Not open for further replies.

Corneliu

Technical User
Sep 16, 2002
141
US
I have an access database where I keep prices of different locations in a county.
Each location is shown in a form with a GROUP By from a query. I do not update the location records at all. What I do update is the price of each location, which is in a different table.

Location Table
LocationID linked with LocationPrice Table
Name
Address
etc

LocationPrice Table
LocationID linked with Location Table
Price
UpdatePriceDate

What I want to show is this:
In the form, show the one location, but on one side of the page show me all the prices that location went thru.
Say:
Location: 514
Address: 9999 subway drive
Division: Something

Price Changes:
$512.00 05/05/2003
$640.00 06/30/2003

So just show the location information once, and say on the side of the form show the prices that location is been thru.
I have the form set and all works great, but I do not know how to get ALL the prices that location is been thru. I can only get one price and that is it.

Anyone can help me there, please?
 
Create a subform for the Main Form. The subform would query the table that has all the pricing information. In the query just add [Forms]![NameofForm]![LocationID] to the criteria of the LocationID field from LocationPrice Table.



"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
THANK YOU. Worked Great.
One small thing please.

Is there a way to get rid of the ID field?
I just want to show the price and date.
When I tried to add only the Price and date without the ID field to the query, when creating the SubForm, it gave me an error that and Autonumber ID must be available.
I also tried to change the field from Visible:Yes to No, but still shows up.

Any help there please?
 
Never mind. Got it jfgambit.
I appreciate your help.

Just had to dig deeper into the form properties.


Thanks again.
 
Glad I could be of assistance. Good Luck on the db


"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top