Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating current form with data from different table

Status
Not open for further replies.

QedMatt

Programmer
Nov 21, 2001
14
US
Hi all,

Sorry if this is elementary, but I've been searching and just can't seem to find the right answer. I am using Access 97, and am familiar with VBA. Any insight is greatly appreciated!

I am working on a form that requires a list on one side of all available courses, pulled from tblCourse. The columns to be displayed are CourseID, CourseCode and CourseTitle.

The form is for grouping courses under different catgories of students. For example, Attorneys will have courses A, B and C, and Accountants might have C, D and E.

The user needs to, for each category of student, scroll through the list of all available courses (1082 courses), and click various courses to add them to the tblCategory table (on which the form is built).

What I need is to have each course the user clicks on the left to appear in a field on the right, AND to allow the user to also type in two more values: timing & priority.

The tables I've set up are:
tblCourse & tblCategory

tblCourse has the following:
CourseID : Primary Key
CourseCode
CourseTitle : Primary Key
etc.

tblCategory has:
CategoryID : Primary Key
CourseID : Foreign Key
CourseCode
CourseTitle : Foreign Key
etc.

This is a one to many relationship: there can be many courses for each category of student.

What's the best way to set this up? Use a subform based on a query of courses? Have a multi-line text box, and put in a command button to transfer the selected item to a combo box? I've been going in circles!

Thanks for any insight!

Matt
 
If you can get ahold of the Access 97 Developer's Handbook by Litwin, Getz and Gilbert (SYBEX), chapter 7 has code to have two comboboxes and as you click on records in one combobox, it will populate the other. I am sure there are other helpful tips for you. And it comes with a CD with all the code.

If that is not an option, maybe someone else here has an idea... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Awesome! THis is exactly what I needed. Thanks for pointing me in the right direction. Guess I should open a book every once in a while :)

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top