referencing selected subform control

D

drabbacs

I have a form which contains several subforms that display
data from queries in tabular format in text boxes. I want
to allow the user to be able to select one of the entries
and then press a command button to execute a macro-query
based on that selection.

As a quick example in the parent form, call it frm_Parent,
I have frm_sub1 and frm_sub2 subforms. In frm_sub1 I have
a text box which lists dates, call it DateBox. I want the
user to be able to select a particular entry from the
listings in DateBox and then press a command button or
alternatively they could double click the date and this
would execute the macro-query.

I used to have this information displayed in a listbox and
used the bound column and onDoubleClick property to feed
the macro-query. I moved away from that layout so I could
do some conditional formatting in the textboxes.

Is it possible to capture a selected entry in a textbox in
the same way as in a listbox? If so, how? How does one set
up a reference to a control in a subform using the forms!
[name_of_form].[name_of_control] format?

Any help is greatly appreciated.
Drabbacs
 

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