magmike,
As my initial response indicated, I felt there was more to your question
than just "how to change a Record Source"...
I would never suggest that a user be allowed to go into Design mode to
make changes!
Now that you have clarified the issue...Jerry Whittles response is what
you need, but... I agree with Jeff Boyce that changing the RecordSource "on
the fly", is a bit unusual. I'd also be interested to know why you're
finding it necessary to do so.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
You could put something like this on the On Click event of a command
button
on the form. "Emp2" is the name of the table or query.
Private Sub Command35_Click()
Me.RecordSource = "Emp2"
End Sub
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
- Show quoted text -
Sorry, guys. My fault. I should have mentioned that I wanted to be
able to use the OnClick of a command or the AfterUpdate on a combo box
to change the data source of a form that I built, rather than using
the filter method. I certainly don't want my users going in to design
mode to do it!