Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Understanding a form (XP)

    Picture three tables: tblStudents, tblCourses, and tblStudentCourses. The third one is a junction table that stores the courses that each student has completed. Now picture a tabbed form. The first tab displays student information (name, payroll ID, etc.). The next tab has a subform to display a list of courses the student has completed and the date of completion. I want to put an "Add..." button in the form footer area. This button will launch a pop-up form with all the available courses listed. I would double-click on the course I want to add to the student's "completed" list (or select the course and click on "Add"). At that point, the pop-up form would close and the selected course would appear in the list of completed courses, with today's date as the completion date.

    How does the course get added to the student's list of completed courses? I'm pretty sure I need to do some hocus-pocus in the VB Editor, but I don't know how to approach it. Can anyone help? Thanx!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Understanding a form (XP)

    You can do this without VBA and without popup forms.

    1. Use a combo box with tblCourses as Row Source to display the course in the subform. This means that the user can select the course from the list part of the combo box.

    2. Set the Default Value of the date of completion field to =Date(). Today's date will automatically be filled in for new records, but it can still be changed if necessary.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Understanding a form (XP)

    Well, that's certainly the simple approach, and given my limited programming skills, it's probably the best choice for the short term. I asked about the pop-up forms and all that because an off-the-shelf product we now use employs those tricks. The product works pretty well, but we've had trouble customizing it to meet our needs and we've had trouble getting it to work at all some days on our LAN. So I've taken on the job of building our own application from the ground up with MS-Access. I'm trying to duplicate some of the functionality of the existing application, but I don't think anyone will object to using simpler techniques, such as you suggest.

    Thanks for the help, Hans!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •