Results 1 to 3 of 3
  1. #1
    Boatsmulcahy is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jul 2016
    Posts
    1

    Information from one form auto fills another


    I'm trying to create a school database. I am trying to make it so when I open up a "create new course" form, fill it out and then click a button to add students I don't have to refill in the course information on the student form. I can create a button to save course and open student form but still have to refill in the course name and class number.

  2. #2
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Info is kinda sketchy, but this comes to mind: if you're closing the first form, don't. Make it invisible instead and get the values you need from it by referencing the controls in unbound controls on the next form. Something like =Forms!frmCourse.CourseID. When you close the second form, in the close event, either close the first form or make it visible so that you can create a new course without having to open it again.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    For a database of this nature; one has a Course table, a Student table and a CourseStudent table.

    It is your CourseStudent table that is the basis of your screen form.

    In your CourseStudent table there is a Course field which is set as a LookUp field type pointing at the Course table and the Student field is a LookUp field type pointing at the Student table. The wizard launches when you select the LookUp field type to help you set up the pointing.

    With each new record made in the CourseStudent table it does not inherently know which Course (or Student) so to automate that is done at the form level. There are a couple ways to approach that. You could use the Course table as the record source of Main Form and inset a CourseStudent Form as a sub form within it. The wizard will help set up the linking.

    Another approach is to use a combo box in the header of a stand alone CourseStudent Form - and then when you select the Student have some vba that automatically writes in the Course displaying in the header.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-22-2015, 03:32 AM
  2. Replies: 3
    Last Post: 06-05-2014, 11:44 AM
  3. Auto fill information
    By Endorphin in forum Access
    Replies: 1
    Last Post: 07-14-2013, 03:50 AM
  4. Replies: 1
    Last Post: 09-08-2011, 06:36 PM
  5. Replies: 2
    Last Post: 05-06-2011, 02:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums