Are you attempting to change the source object of a subform control that has the focus? You may need to set the focus outside the subform before doing this.
Also, if the code is running in the subform, you will need to reference the parent form in your code.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]