Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    charlyzaingel is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    13
    Option Compare Database
    Private Sub Instructor_AfterUpdate()
    'Initialize InstructorID for each Instructor change
    If Not IsNull(Me![Instructor]) Then
    Me![InstructorID] = (Me![Instructor])
    Me![Status] = (Me![Instructor])


    End If
    End Sub

  2. #17
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    It is the same code and you expect it to act differently? That doesn't make sense. Especially since I wrote:

    Quote Originally Posted by boblarson
    Why in the Instructor After Update event are you setting the Status to the Instructor? That is what is happening with:

    Me![Status] = (Me![Instructor])
    So, if that is wrong then, why did you leave it like it was? If I said it was wrong then it was wrong and it needed to be CHANGED. If you expect it to come from the instructor combo, then the instructor combo's column count would need to be 3 and you would use
    Me.Status = Me.Instructor.Column(2)

    (2 because that is the THIRD column since combos' columns are ZERO-BASED).

  3. #18
    charlyzaingel is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    13
    Good Morning Bob,

    I truly appreciate all of your help. I have exhausted myself with this part of the database. You don't have to shout.

    I did not change it, because I didn't know what to change it too. When you don't know what to change it too, it's best to leave it alone . Now that you taught me how columns come in to play, I now understand how to reference them in Code.

    When I changed my code to read:

    Me.Status = Me.Instructor.Column(2)

    (2 because that is the THIRD column since combos' columns are ZERO-BASED).[/QUOTE]

    It does not populate when the Instructor is selected. Also shouldn't the Row Source for the Status table be populated from the Instructors table? When I make that change or reference it to the qryInstructorsExtended, it doesn't not have the right data in the drop down, nor does it populate.

    Again, I greatly appreciate your assistance.

  4. #19
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Yes, it would need to be included in the row source from the table which has that. I have very limited ability to work with accdb files while at work so it is difficult for me to just go in and play with it.

  5. #20
    charlyzaingel is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    13
    Thanks Bob.

    I have some idea, it's just not working out for me. As for now the user will have to populate it manually until I figure it out.

    If you ever find time, please assist in the solution. Thanks.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Restricting values in combo boxes
    By Remster in forum Access
    Replies: 4
    Last Post: 09-08-2010, 12:24 PM
  2. Replies: 1
    Last Post: 03-27-2010, 06:13 AM
  3. Replies: 2
    Last Post: 08-24-2009, 10:36 AM
  4. Replies: 10
    Last Post: 08-01-2009, 06:48 AM
  5. Replies: 7
    Last Post: 05-16-2009, 08:08 AM

Tags for this Thread

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