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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordsource of mainform used by subform

Status
Not open for further replies.

wxkeep

Programmer
Jul 5, 2005
57
US
Alright - I may have gone about this COMPLETELY the wrong way (which may explain why I'm confused and begging for help). I have 4 tables:

Project
Bids
Company
Bidders

And all 4 tables are linked together by generated id numbers. There is obviously only one record for each company - but that company can have several projects - each of those projects will have a couple of bidders - that may place several bids each (as they compete with one another).
The only trick is that sometimes we create projects before we assign them to a company - and to complicate it just a hair more we'll sometimes start taking bids before we assign it a company.

The linking is all set up the way I want it to be. I can create a record in projects - start the bidders - and the bidding - and then go back to the record in projects and assign the company id and it finishes all of its linking.

For my purpose there is ALWAYS a project - if there isn't - I don't care about bidders or a company.

I've created a form with 4 subforms (each to display different information) Now, I'm sure some people are going to ask why I didn't just use the tabsheet object - and well, mostly it was asthetics. So what I have is four subforms all sitting on top of one another and as you toggle through the views - certain subforms are made visible and others are hidden. But they all pull their information from the same query. One query that will find the project based on projectid - and then find the corresponding company if present. And then there is another query for two of the subforms that finds all the bids for a given project and then their corresponding bidder information. For simplicity (perhaps?) each bidder will only bid on one project. If they bid another time a new entry is made in bidder database for their participation in that given project.

The question is - I have the recordsource for all of these subforms as the same query - including the recordsource of the mainform - so I think when the mainform is opened - the query is ran 5 seperate times. I'm sure that as this database is implemented that will turn out to be a HIGHLY ineffiecient way of running all of this. Can someone verify or shed some light on an easier way to do this? Thanks!
 
I guess the bottom line is that I have a mainform that actually doesn't need ANY data (the keyid number is passed to it) and four subforms that all play on the SAME data just displaying it in different ways. But it seems like when I open the main form it runs the query (that i have my subforms tied to) 4 times (once for each subform) when that really isn't neccessary since obviously the data doesn't change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top