Results 1 to 3 of 3

update a Combobox in a Subform from a Combobox in the parent Form

Threaded View

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    Flitwick
    MS-Off Ver
    Excel 2007
    Posts
    14

    Cool update a Combobox in a Subform from a Combobox in the parent Form

    I have a Form named [Student Details] with a Combobox named [Status] and RowResource property
    "Student";"Graduate". This feeds a Table [Students].

    There is an embedded Subform [Attendance Subform] also with a Combobox [Status] and
    RowResource property "Student";"Graduate". This feeds table [Student Attendance].

    A Query named [Student Attendance Extended] is set up to link ID from Table [Students] to [Students] in
    table [Student Attendance].

    When someone updates Forms![Student Details].[Status] to the value 'Graduate' I would like the value
    of Forms[Student Attendance}.[Status] to change from 'Student' to 'Graduate' too.

    In Forms![Student Details].[Status] I have an event procedure AfterUpdate as follows:

    Private Sub Status_AfterUpdate()
         Tables![Student Attendance].[Status].Value = Tables![Students].[Status].Value 
         Forms![Attendance Subform].[Status].Requery
    End Sub
    I have a reciprocal event procedure AfterUpdate in Forms[Student Attendance}.[Status]

    Private Sub Status_AfterUpdate()
         Tables![Students].[Status].Value = Tables![Student Attendance].[Status].Value 
         Forms![Student Details].[Status].Requery
    End Sub
    If I change a record in the form to Graduate It doesn't update the [Student Attendance] table or the
    [Attendance Subform] combobox [Status]. Can anyone help please? I'd prefer to do it dynamically
    Last edited by alansidman; 04-25-2014 at 10:23 AM. Reason: code tags added

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 11-07-2014, 01:21 PM
  2. [SOLVED] selected combobox will automatic update in the list to another combobox
    By aimjhun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2014, 07:22 AM
  3. Why Form Combobox VBA do not fill the combobox? Please help!
    By alex_shin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2013, 03:03 AM
  4. Transfer User form data to a worksheet w.r.t. combobox item on the form
    By nm766 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2011, 12:43 PM
  5. transferring combobox value from one user form to populate combobox on another
    By smartphreak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2010, 10:12 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1