By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,705 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,705 IT Pros & Developers. It's quick & easy.

Access 2007 linked table/form question...

P: 1
Hello. I have created a 2007 database to help organize a golf outing event which requires the collection and tracking of a lot of linked data. Everything in my dbase is linked to my Main Business Contacts table which consists of 600 businesses who participate in and sponsor our event (primary key is BusID). From these 600 records I have linked tables consisting of 1) different office locations, 2) individual contacts within those office locations, 3) payments for participation and sponsorship, 4) golfing parties associated with businesses and 5) Auction Items donated from the businesses.

I have all of these tables linked either to directly to the Main Bus Cont table through the BusID, or to the Office Locations table through the OffficeLocID which is then linked directly to the BusID.

Because most of this information is gathered on a single Registration Form that is submitted each of the companies, I wanted to create a form that would allow me to enter this data in a neat an organized way.

My form is set up with all the fields in my Main Business Contacts table and I am trying to add command buttons to open each of the other tables (or forms based on the tables) but I would like these Pop-up Forms to only show the linked data (I only want to see the payment entries for the Business record that I am currently viewing -- i.e. when I am in the "TimHub Construction" record on my form, I want to click a button to open the payment table but just to view or add payments for "TimHub," not all records in the payments table)

I can't seem to make this work -- I have tried to set the command button to "only show specifc records" based on BusID and the child field, I have tried to use a query as the record source of the form, but I can't seem to make this work.

Does anyone have any suggestions on either how I can make this work or, perhaps, a better way to try to go about this?

Aug 25 '08 #1
Share this Question
Share on Google+
1 Reply

P: 167
You can use OpenArgs, as quoted from VBA help:
The following example opens the Employees form in Form view and displays only records with King in the LastName field. The displayed records can be edited, and new records can be added.

DoCmd.OpenForm "Employees", , ,"LastName = 'King'"
Probably better way would be to use query for this.
Pop-up form should be based on a query that has BusID field in it.
In Where row of that field you could put a code like:
Expand|Select|Wrap|Line Numbers
  1. Forms!MainBusinessForm!BusID
That would make Pop-up form open only records that have BusID equal to BusID from your MainBusinessForm.
Sep 24 '08 #2

Post your reply

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