Refresh RowSource of combobox based on field on form

Anonymous
2016-10-04T14:51:49+00:00

I need another pair of eyes to tell me what I am missing. I have a form based on a table. On that form there is a combobox with a SQL rowsource: SELECT [MPActorQ].[MovieID], [MPActorQ].[Title], [MPActorQ].[PeopleID] FROM MPActorQ WHERE [MPActorQ].[PeopleID]=[Forms]![ActorFullF]![PeopleID] ORDER BY [Title]; 

This works correctly by listing only movies associated with people on the MPActorQ. The issue is that it only lists the movies for the first peopleID opened. I would like to have it update the combobox list when the record (peopleID) is changed. Ive tried lots of variations of: 

Private Sub PeopleID_AfterUpdate()

    Me.FavMovie.Requery

End Sub

but if the next or previous record button(or even record changed from another combobox) is selected the combobox data doesnt update. Ive also tries a few combinations on the Change event of peopleID.

I also thought of trying to use VBA to create the rowsource but I am not very good at creating my own code. 

Can anyone provide any suggestions on how to get my combo box rowsource to update depending on the peopleID displayed on the form?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2016-10-04T15:57:57+00:00

    Hi,

    try the Requery in On-Current Form event.

    Ciao Mimmo

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2016-10-04T17:10:49+00:00

    I tried that and it didnt work before, but I got it now. Thanks!

    0 comments No comments