Results 1 to 6 of 6
  1. #1
    Westsider is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3

    1 to many forms

    I want to create a form to enter statements into a table. The fields are key, student, category, comments, teacher, subject.
    Scenario is teacher & subject- make multiple comments on each person in list. I want them to be able to create multiple records for different students without having to add their own information (teacher & subject) over and over again. However this information needs to be recorded with each record.
    What is the best form to create to do this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,969
    Could have comboboxes (Teacher and Student) AfterUpdate event of each run code that sets the Default property. Every subsequent comment record entered will apply the default values.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Westsider is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3
    Thanks for the response, but it is still not working for me.
    I have a combobox for teacher. In the properties of that combobox i put the following expression into the "After Update" property. =[cboTeacher].[DefaultValue]=[cboTeacher] This still did not seem to give me any results. What am I missing??

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,969
    In that event property select [Event Procedure], then double click the ellipses (...) and that will take you to the VBA code editor. Put code there.

    Me.cboTeacher.DefaultValue = Me.cboTeacher
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Westsider is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3
    Thanks again.
    Some progress - I got a default entry - but it was #Name?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,969
    That usually means Access/VBA can't find the reference. However, believe I erred in suggesting the AfterUpdate event, try BeforeUpdate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Multiple forms or embedded sub-forms
    By Juicejam in forum Forms
    Replies: 2
    Last Post: 08-23-2011, 07:31 AM
  2. Replies: 1
    Last Post: 01-04-2011, 05:04 AM
  3. Search forms and sub forms
    By FadingAPE in forum Forms
    Replies: 1
    Last Post: 12-15-2010, 01:59 PM
  4. Replies: 4
    Last Post: 04-01-2009, 08:49 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