IanNav
Programmer
- Feb 26, 2001
- 79
Hi,
I have an Access Database that I am playing around with, I need some help to display information I have generated via queries.
I am fairly new to access itself (so please be patient), but I do know VB ok. I mainly work with PICK databases though and am getting frustrated not knowing the access tools.
Here is the Scenario.
I have 2 Queries that produce a result when a Change() event is forced on a combo box (i.e. depending on the text in the combo box, the query returns different information, in this case “Media Source”).
I would like to show the results of these 2 queries data field in textboxes on the form.
so....
Qry1 fields (this is done sorted by date and selected TOP 5 then averaged on records that match the media source from the Combo box)
-----------
Average_Sales_Val
Average_Sales_Qty
Average_Media_Cost
Average_Media_AR
Qry2 fields (this is done sorted by date and selected TOP 1 on records that match the media source from the Combo box)
-----------
MostRecent_Sales_Val
MostRecent_Sales_Qty
MostRecent_Media_Cost
MostRecent_Media_AR
Both of these work off the same Master table with contains lots of fields (I’ll just list the appropriate ones)
Tab1 fields
-----------
Sales_Val
Sales_Qty
Media_Cost
Media_AR
On the form I want to display every field in qry1 & qry2 individual txt box, but when I set the record source for the form to be both of these queries the form goes blank when I try and run it.
I have tried to figure out the VBA code to do the same, but it still doesn’t look right.
Any Ideas?
Also : something I don’t know about? What is the Detail object on the form? What purpose does it have?
Cheers
Ian
I have an Access Database that I am playing around with, I need some help to display information I have generated via queries.
I am fairly new to access itself (so please be patient), but I do know VB ok. I mainly work with PICK databases though and am getting frustrated not knowing the access tools.
Here is the Scenario.
I have 2 Queries that produce a result when a Change() event is forced on a combo box (i.e. depending on the text in the combo box, the query returns different information, in this case “Media Source”).
I would like to show the results of these 2 queries data field in textboxes on the form.
so....
Qry1 fields (this is done sorted by date and selected TOP 5 then averaged on records that match the media source from the Combo box)
-----------
Average_Sales_Val
Average_Sales_Qty
Average_Media_Cost
Average_Media_AR
Qry2 fields (this is done sorted by date and selected TOP 1 on records that match the media source from the Combo box)
-----------
MostRecent_Sales_Val
MostRecent_Sales_Qty
MostRecent_Media_Cost
MostRecent_Media_AR
Both of these work off the same Master table with contains lots of fields (I’ll just list the appropriate ones)
Tab1 fields
-----------
Sales_Val
Sales_Qty
Media_Cost
Media_AR
On the form I want to display every field in qry1 & qry2 individual txt box, but when I set the record source for the form to be both of these queries the form goes blank when I try and run it.
I have tried to figure out the VBA code to do the same, but it still doesn’t look right.
Any Ideas?
Also : something I don’t know about? What is the Detail object on the form? What purpose does it have?
Cheers
Ian