open a form from a subform when clicking on data

T

Tracy

Dirk,
I'm afaid I'm not understanding you, Tracy. See my questions inline:

Tracy said:
I think I didn't explain things correctly or left out some info... I
do apologize and really appreciate your help with this. I don't want
people editing the subform but let's say they could click on the
record selector and choose the data they need.

If you don't want people editing the subform, but just want to use it to
display a list of choices, would it maybe be better to use a list box
instead?
There are several
selections but one of them is "Section 10: Superior Courts".

Do you mean, there are several records displayed by the subform, and for
one of them a text box will be displaying the value "Section 10:
Superior Courts"?
The
control source name is UC_grp_name but it's actually named Budget
Unit.

Do you mean that "Budget Unit" is the name of the text box, but
"UC_grp_name" is the name of the field to which the text box is bound?
Or is it the other way around? Or have I misunderstood completely?
I would like to open the form CriminalJusticeYear and click in
the subform and select ever which record selector I need

So, "CriminalJusticeYear" is the name of the main form that contains
this subform, the subform we're talking about above?
and by doing
so, open up in the same form CriminalJusticeYear as a subform the
form f_PrimaryEntry.

I'm not sure what you mean here. Before, I thought you were talking
about opening a separate form to show the details of whatever the user
clicked in the subform. Now you say you want to open it "as a subform".
Are we talking about two subforms on the main form, then? Subforms are
always open, so it's not a question of *opening* one, but maybe you're
asking how to get a second "details" subform to show the information
related to the item clicked in the first, "list" subform. That would be
easy enough to do.
The form f_PrimaryEntry has a text box named
GroupName and it's control source is UC_grp_name. (Should I name both
of them Budget Unit or is it okay to have different names on each?)

The names of the controls don't really matter.
I also need the f_PrimaryEntry to show all the records for the
GroupName but display them by bp_num on each screen.

If I understand you, that's just a matter of setting the form's
recordsource query to sort the records the way you want. But first,
let's figure out how you want the forms and subforms to work. I'm not
sure yet what you want.
When I write the event procedure, I write it in the forms On Click -
not the subform, correct?

No, it would be in the Click event of the subform; more exactly, of the
form object that is being displayed as a subform. It's important to
understand the relationships of these objects: there's a main form, and
on that main form there is a subform *control*, which acts as a window
to display a different form. So there are three different objects
involved: two form objects (one main form and one form that will be
serving as a subform), and one subform control. Each of these objects
has properties and events of its own. When you open the main form in
design view, you can see the details of both the main form and the
subform form. If you click on the subform once, you'll select the
subform *control*. Then if you click on it again, you'll be working
with the subform *form*. Sometimes this is confusing.

The event procedure I suggested in my previous post was intended for the
Click event of the subform *form*, not the main form or the subform
*control* on that form.
 
T

Tracy

Tracy said:
Dirk, I answered your questions inline as well. I really appreciate your help with this. I thought I sent this earlier in the day but when I checked, it wasn't showing.
 

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