JacksMamma
02-10-2017, 01:05 PM
Hi Everyone! :hi: I'm new here, and a beginner (to say the least!).
Help...please???? It's a 2-part question and I'm totally stumped. I'd look for a solution on my own but I don't know the best way and I see so many examples that only answer one part of things -- so I don't know if I need to do a query, function, procedure, or module.
OK - here goes!
The database is in MSSQL and I have dbo_linked tables to Access 2016.
I have a contact table with basic info like first_name, last_name, etc. and it has 1-1 relationship with what I'll call "c_tables" -- which are profiles for each contact. A contact can have many profiles. Profiles include c_employee, c_songwriter, c_performer, c_user. (e.g., one contact can be a writer and an employee, and I have to capture a lot of data for each profile.) Note: a contact can have more than one c_performer profile but only one of the other profiles.
I have a c_profile table that is a join table. It should capture the contact_id from the contact form.contact_id and a profile id as you'll see below as each profile is created.
All that said - I'm creating forms and I've made my basic form for contacts bound to the contact table.
Question 1: How do I best pass the id to another form? I ask because there are so many fields for each profile that it's impossible to just make the profiles be subforms on the main contact table. I've added command buttons on the contact form to open frm_employee, frm_writer, frm_performer, frm_user. Each form is bound to the correct table for the profile. I'm currently passing the id by typing in the Default property on the profile text box for contact_fk. Is this the best way??? To the bigger question, I'd like to add a "Save" button to each profile form and when clicked I'd like it to refresh the form, update the appropriate c_table, and add a record to the c_profile table capturing (eg) c_writerprofile_id.
Question 2: Once done with filling out any given profile form, I'd like to return to the contact form and see (somewhere on there) all of the profiles that that contact has. Is this even do-able? Does an object like this have a name??
Thank you in advance should any one of you take pity!!!
Help...please???? It's a 2-part question and I'm totally stumped. I'd look for a solution on my own but I don't know the best way and I see so many examples that only answer one part of things -- so I don't know if I need to do a query, function, procedure, or module.
OK - here goes!
The database is in MSSQL and I have dbo_linked tables to Access 2016.
I have a contact table with basic info like first_name, last_name, etc. and it has 1-1 relationship with what I'll call "c_tables" -- which are profiles for each contact. A contact can have many profiles. Profiles include c_employee, c_songwriter, c_performer, c_user. (e.g., one contact can be a writer and an employee, and I have to capture a lot of data for each profile.) Note: a contact can have more than one c_performer profile but only one of the other profiles.
I have a c_profile table that is a join table. It should capture the contact_id from the contact form.contact_id and a profile id as you'll see below as each profile is created.
All that said - I'm creating forms and I've made my basic form for contacts bound to the contact table.
Question 1: How do I best pass the id to another form? I ask because there are so many fields for each profile that it's impossible to just make the profiles be subforms on the main contact table. I've added command buttons on the contact form to open frm_employee, frm_writer, frm_performer, frm_user. Each form is bound to the correct table for the profile. I'm currently passing the id by typing in the Default property on the profile text box for contact_fk. Is this the best way??? To the bigger question, I'd like to add a "Save" button to each profile form and when clicked I'd like it to refresh the form, update the appropriate c_table, and add a record to the c_profile table capturing (eg) c_writerprofile_id.
Question 2: Once done with filling out any given profile form, I'd like to return to the contact form and see (somewhere on there) all of the profiles that that contact has. Is this even do-able? Does an object like this have a name??
Thank you in advance should any one of you take pity!!!