简体   繁体   中英

ACCESS VBA: Add record in 1 table on a multi-table form possible?

I am currently creating a Database in Access, and I am experiencing difficulties with one thing, and was hoping I could get some advice/tips for it:

I basically have one form on which 3 tables are linked: tblModels / tblProjects / tblJobs

The "models" are the first input, then each "project" is linked to a model, and each "job" is linked to a project; the 3 tables are joined;

Picture_of_Layout-Model-Project-Job_Form

I can select a model/project/job in the list boxes, and I can see what is related to what I just selected; I would like to be able to update or add a model/project/job INDEPENDANTLY using the text boxes, meaning that if I click on "new model" button, I just want to add a model only. On the other hand, if I update directly in a "job" text box for example, I would like to only save/update the job I'm modifying. Using "form_dirty" event / DoCmd.GoToRecord, , acNewRec / save record commands in VBA etc, is always tied to the whole form, which is the issue. I cannot find a property to focus my input on one table only.

How can I separate my record input on a form like that? Can I "pause" the record input on 2 out of 3 tables when I am on this form? Do you have any tips experience with this?

I hope my explanation is clear enough, if not let me know:) !

Thank you guys,

I am currently creating a Database in Access, and I am experiencing difficulties with one thing, and was hoping I could get some advice/tips for it:

I basically have one form on which 3 tables are linked: tblModels / tblProjects / tblJobs

The "models" are the first input, then each "project" is linked to a model, and each "job" is linked to a project; the 3 tables are joined;

Picture_of_Layout-Model-Project-Job_Form

I can select a model/project/job in the list boxes, and I can see what is related to what I just selected; I would like to be able to update or add a model/project/job INDEPENDANTLY using the text boxes, meaning that if I click on "new model" button, I just want to add a model only. On the other hand, if I update directly in a "job" text box for example, I would like to only save/update the job I'm modifying. Using "form_dirty" event / DoCmd.GoToRecord, , acNewRec / save record commands in VBA etc, is always tied to the whole form, which is the issue. I cannot find a property to focus my input on one table only.

How can I separate my record input on a form like that? Can I "pause" the record input on 2 out of 3 tables when I am on this form? Do you have any tips experience with this?

I hope my explanation is clear enough, if not let me know:) !

Thank you guys,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM