Pull info between two table/forms

tjones

Registered User.
Local time
Today, 09:50
Joined
Jan 17, 2012
Messages
199
I really appreciate all the help, I know that I am really new to Access (2010) and Queries especially are hard for me to understand.

I am attempting to pull information from the course taken TABLE/FORM and fill the information to the exact same fields on the practicum TABLE/FORM.

More relevant information: The course form is a split form that contains courses available. if the course is a "capstone" you select the CHECKBOX for it hence Practicum = 3. the Practicum form opens off the course form via cmdbutton I want the Term,Year,Grade fields (the only ones that are the same) to fill from the information on the course form/table but there are also more fields that need to be filled on this form that is unique to the Practicum course.

I was given these instructions but do not really understand what I am supposed to do.

1. Open the query builder.
2. Add the tables and/or queries you want to select from.
3. Draw join lines to connect the PKs to the FKs.
4. Select the columns you need from each table/query.
5. Name the query and save it.
6. Change the RecordSource of the form to the new query.
7. All the columns in the query will be available for selection as ControlSources for the controls so you can bind the controls to the RecordSource.


1. Ok this I do know how to do

2. Do I need to open both tables? Courses and Practicum?

3. I think PK (primary key) and FK (fill Key)? OK I think you are saying: In Courses (main form) select "Term,Year,Grade" fields and draw lines to the Practicum (secondary table) to the same fields?

4. This would be down below on the query form correct? so Term,Year,Grade (but from which table?) Query1.jpg this is what I did.

5. easy enough

6. So I thought i knew how to do this but ..... would be the record source (on the Property Sheet) for the Practicum form? when I do this it does not allow me to fill the other unique fields on the Practicum form.

7. Is that the control source for the TYG fields on the form property sheet? and then as for the bind controls to the recordsourse I am entirelly lost

I know I am doing something wrong as it is not working. :(
 
Last edited:
I didn't follow the beginning, but to explain those steps:


2. Yes sort of: you add both tables to the query designer view.

3. FK is short for foreign key. You draw one line from the primary key field in Table 1 to the foreign key field in Table 2 (the field that relates Table 2 to Table 1). Ideally, you would create such relationships in the relationship manager and then these joins would automatically appear in any query you create using those tables.

4. Yes, that's right. The fields you want to show.

6. Save the query. Open the form in design view. Go to its properties > Data tab page > Top row - Record Source: type the name of the query there (or select it from the drop down list).

7. All the fields you selected in step 4 will then be available to bind controls to in the form. (To bind a control: select it in design view, go to its properties > data tab page > top row - Control Source: select the field from the drop down list (or you could build an expression there).)
 
I was attempting to clean up my own mess and also offer more information I thought would be of help. I did link the two (or thought I was successful...sigh).

When I make the query and set is as the record source it still did not fill the three fields but it also would not let me fill the other fields on the Practicum form. The only reason I am trying to have the TYG fields on both is so when you look at the Practicum information (proposal date, title, committee members, defense date, etc) all information including the TYG is there.
 
I have also attempted to just set the control source in the Practicum G field to
=[Course Taken]![Grade] which does result in an entry of #Name? in the grade field.
so at least I am getting something but it is not inserting the "grade"
 

Users who are viewing this thread

Back
Top Bottom