Control recordsource/Controlsource issue

J

John Thomas

I'm having trouble with the following Control, I'm trying to link to a query
instead of
the forms recordsource, the form layout goes like this.
Main form name is: Splitter1
Sitting on that is a Tab Control named: Writing
The Tab page name is: TopicStudy

The Combo box name is: Chapter1
Bound ole object frame called: TopicStudy1

When I make my selection in the Combo box, which has as its source a query
called: StudiesQuery
I want the Control TopicStudy1 on the same tab, to go to the StudiesQuery
field called: Document(a msWord embedded field), of the selected record in
that combo box, identified by the field Ref3 on that query

Problem is that it is by default linked to the main form recordsource
instead of StudiesQuery, my following attempt has failed, and I need just
the single control TopicStudy1 to be linked to the StudiesQuery and respond
to its own navigation from the combo box of that same query, not the whole
form. The combo box is working, but the response to it below in AfterUpdate
is not, I cannot use a subform as a solution, it must be thru the code.
Thanks for any help?

Private Sub Chapter1_AfterUpdate()
Me.TopicStudy1.ControlSource = "[StudiesQuery].Document"
Me.RecordsetClone.FindFirst "[Ref3] = " & Me![Chapter1]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub



Thanks John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top