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

Automatically Update Subform

P: 46

I have two tables that are feeding a form/subform relationship. The first table, called "Tbl_Projects" lists a variety of projects taken on by a department. A second table called "Tbl_Project_Codes" (the "many" in the one-to-many relationship) details various codes that are associated with the projects. For example, a project may be "Marketing Campaign" and the codes may be "Conference Call," "Road Show," and "One-on-one Meeting."

I have set up a form/sub-form with two "windows" as seen below:

Main form is called Frm1 and subform is Frm2.

The first window is to create a new project. Clicking the "Create New Project (Upload)" button will add the inputted fields to the TblProjects table. "View All Projects" just takes you to that table.

The "Create New Campaign" subform uses a drop-down box to return all associated campaigns with a project and/or to add a new one.

I've written some minor code for the drop-down box in the "on focus" to update with a newly added code.

What I would like to do is: when the newly selected form is selected in the drop-down box (newly selected would just be when there are no campaigns associated with the project), it automatically adds the project code to the first field in the subform (Project).

Any suggestions?

Thank you in advance for any help you can provide.
Nov 16 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 12,364
The combo box is on the main form and the table is the subform right? And the two forms are linked on the Project ID field with the child/master properties set up? If so, then it's automatic, you don't need to tell it to fill in the linked field.
Nov 19 '07 #2

Post your reply

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