Help with Form Please

M

magmike

My goal is that the user can click on a record from a subform list of
records, and that the details of the clicked on record will display in
the parent form's fields.

The subform is a continuous form and I have set enabled to false and
locked to true so there can be no editing of the records in the
subform and so the clicking of a record row does not change the look
at all by highlighting the field. My plan is to use a radio button at
the beginning of each record in the subform.

How exactly would I code the OnClick or AfterUpdate of the radio
button (and which do you recommend using) in order to populate the
fields of the parent form based on the selected record's ID number?

Also, how would I go about highlighting the row (or record) in the
subform that is currently being displayed in the parent form?

Thanks in advance!
magmike
 
D

Dominic Vella

Let's say:
* you have a text box in the parent form called txtChildData.
* you have a text box in child form called txtData
* and the subform object is called fsubChild

the 'Control Source' property of your txtChildData should be something like:
=fsubChild.Form!txtData


As far as highlighting the row (or record) in the subform that is currently
being displayed in the parent form? Well, that's kinda strange as all the
records in the subform should relate to the Parent Form. All the Child
records in reality should always be highlighted, therefore it really doesn't
have to happen.

Hope this helps


Dom
 
M

magmike

Let's say:
* you have a text box in the parent form called txtChildData.
* you have a text box in child form called txtData
* and the subform object is called fsubChild

the 'Control Source' property of your txtChildData should be something like:
   =fsubChild.Form!txtData

As far as highlighting the row (or record) in the subform that is currently
being displayed in the parent form?  Well, that's kinda strange as all the
records in the subform should relate to the Parent Form.   All the Child
records in reality should always be highlighted, therefore it really doesn't
have to happen.

Hope this helps

Dom










- Show quoted text -

On highlighting - let's say I have four records showing in the
subform, Appointments 1, 2, 3 and 4. When I click on Appointment 3,
the details of that record show on the parent form. However, when I
look at the list of appointments -it would be nice that the row
showing Appointment 3 (with a few of the fields there) would be
highlighted somehow (either by a different colored text or bold text
for example) so that the user knows which of the rows listed are being
displayed in detail in the parent form.

Does that make better sense?
 
B

boblarson

No that doesn't make sense. What actually makes sense is that you have
appointments 1, 2, 3, and 4 as records in the main form and then you click on
one of those and it displays the details of the appointment in the SUBFORM,
not the main form. If you want to do it the way you said, use a listbox on
the main form to display the appointments and upon clicking on it show the
details in a subform.
--
Bob Larson

Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 
D

Dominic Vella

Well, the subform should provide an arrow in the record indicator to show
which record is currently selected. No, there is no other way of
highlighting that record individually.

However, may I suggest that instead of a subform, you may be better off with
a list that will select a record to display on your form.
* firstly, forget the parent form, just build a form based on your
appointments
* Then add a list. The wizard should ask you if you want it to control
which record appears.


Dom

Let's say:
* you have a text box in the parent form called txtChildData.
* you have a text box in child form called txtData
* and the subform object is called fsubChild

the 'Control Source' property of your txtChildData should be something
like:
=fsubChild.Form!txtData

As far as highlighting the row (or record) in the subform that is
currently
being displayed in the parent form? Well, that's kinda strange as all the
records in the subform should relate to the Parent Form. All the Child
records in reality should always be highlighted, therefore it really
doesn't
have to happen.

Hope this helps

Dom










- Show quoted text -

On highlighting - let's say I have four records showing in the
subform, Appointments 1, 2, 3 and 4. When I click on Appointment 3,
the details of that record show on the parent form. However, when I
look at the list of appointments -it would be nice that the row
showing Appointment 3 (with a few of the fields there) would be
highlighted somehow (either by a different colored text or bold text
for example) so that the user knows which of the rows listed are being
displayed in detail in the parent form.

Does that make better sense?
 
M

magmike

Well, the subform should provide an arrow in the record indicator to show
which record is currently selected.  No, there is no other way of
highlighting that record individually.

However, may I suggest that instead of a subform, you may be better off with
a list that will select a record to display on your form.
* firstly, forget the parent form, just build a form based on your
appointments
* Then add a list.  The wizard should ask you if you want it to control
which record appears.

Dom








On highlighting - let's say I have four records showing in the
subform, Appointments 1, 2, 3 and 4. When I click on Appointment 3,
the details of that record show on the parent form. However, when I
look at the list of appointments -it would be nice that the row
showing Appointment 3 (with a few of the fields there) would be
highlighted somehow (either by a different colored text or bold text
for example) so that the user knows which of the rows listed are being
displayed in detail in the parent form.

Does that make better sense?- Hide quoted text -

- Show quoted text -

What y'all say makes sense. How this started however, is as a single
record form to add new records and then scroll through them (with the
navigation buttons) one by one if wanted. But then I got the idea to
show the subform list of records as a way to see all the past records
that related to the company in question. Then, wanting to see the
details of past records without having to navigate to it was
interested in being able to click on them. I guess I need to revisit
the design of this form.

I could just use datasheet view on the subform as well, but I chose
the form so I could control the "look" of it. And I also forgot about
the record selector as well. I usually turn that off, but it would be
handy this time.

Thanks for all y'alls help.

magmike
 

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