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
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
It is the same code and you expect it to act differently? That doesn't make sense. Especially since I wrote:
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 useOriginally Posted by boblarsonWhy in the Instructor After Update event are you setting the Status to the Instructor? That is what is happening with:
Me![Status] = (Me![Instructor])
Me.Status = Me.Instructor.Column(2)
(2 because that is the THIRD column since combos' columns are ZERO-BASED).
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.
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.
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.