How can on split up a table in a subform so that a field can be

G

Guest

There is a template in the access templates downloads that I was quite
impressed with. He has a form tab in a contact management database called
"Calls" Under this tab, in the form there are two subforms. One is a "Calls
List Subform" and the other is a "Calls Details Subform" The "Calls Details
Subform" is the notes field from the "Calls" Table. Here is the tricky
part...when you click into a record in the 'Calls List Subform" is shows the
"notes" field and info related to that record, and when you go to the next
record, the "Calls Details Subform" demonstrates those notes associated with
that record...how in the hell were they able to do this?
 
T

tina

i'm looking at the ContactManagement template database that shipped with
Access 2003 (the database is in A2000 file format). if it's not the exact
same version you're looking at, it's probably very similar - so if the
object names i refer to are not exactly the same as what you see, just roll
with it.

open the Calls form in design view. on the toolbar, look at the Object
droplist which lists every object in the form. click the down arrow to look
at the list; you'll see "CallID" listed. select that name from the list, and
you'll see that you've selected an unbound textbox control in the main form,
which is almost hidden by the top subform. look at the control's properties
and you'll see that the ControlSource property is

=[Call Listing Subform].form!CallID

so the value of the CallID textbox on the main form is always equal to the
CallID primary key field in the first subform, named Call Listing Subform.

now click on the bottom subform, named Call Details Subform. the
LinkChildFields and LinkMasterFields both show the same field name - CallID.
in LinkChildFields, CallID refers to the primary key of the Calls table
which the subform is bound to. in LinkMasterFields, however, CallID refers
to the textbox control named CallID on the main form.

this is a standard method of *indirectly* linking two subforms within a main
form - this same setup can be used to link a subform bound to a "child"
table to another subform bound to its' "parent" table, again, both on the
same main form. it would be easier to understand what's happening if the
unbound textbox control on the main form were named "txtCallID", rather than
"CallID"; for that reason, i always put a "txt" prefix on the name of the
linking control in the main form when i use this solution myself.

hth
 
G

Guest

Hi Tina,

Thanks for that insight, I really appreciate it. You are a wonderful person
and extremely helpful!

tina said:
i'm looking at the ContactManagement template database that shipped with
Access 2003 (the database is in A2000 file format). if it's not the exact
same version you're looking at, it's probably very similar - so if the
object names i refer to are not exactly the same as what you see, just roll
with it.

open the Calls form in design view. on the toolbar, look at the Object
droplist which lists every object in the form. click the down arrow to look
at the list; you'll see "CallID" listed. select that name from the list, and
you'll see that you've selected an unbound textbox control in the main form,
which is almost hidden by the top subform. look at the control's properties
and you'll see that the ControlSource property is

=[Call Listing Subform].form!CallID

so the value of the CallID textbox on the main form is always equal to the
CallID primary key field in the first subform, named Call Listing Subform.

now click on the bottom subform, named Call Details Subform. the
LinkChildFields and LinkMasterFields both show the same field name - CallID.
in LinkChildFields, CallID refers to the primary key of the Calls table
which the subform is bound to. in LinkMasterFields, however, CallID refers
to the textbox control named CallID on the main form.

this is a standard method of *indirectly* linking two subforms within a main
form - this same setup can be used to link a subform bound to a "child"
table to another subform bound to its' "parent" table, again, both on the
same main form. it would be easier to understand what's happening if the
unbound textbox control on the main form were named "txtCallID", rather than
"CallID"; for that reason, i always put a "txt" prefix on the name of the
linking control in the main form when i use this solution myself.

hth


Jake said:
There is a template in the access templates downloads that I was quite
impressed with. He has a form tab in a contact management database called
"Calls" Under this tab, in the form there are two subforms. One is a "Calls
List Subform" and the other is a "Calls Details Subform" The "Calls Details
Subform" is the notes field from the "Calls" Table. Here is the tricky
part...when you click into a record in the 'Calls List Subform" is shows the
"notes" field and info related to that record, and when you go to the next
record, the "Calls Details Subform" demonstrates those notes associated with
that record...how in the hell were they able to do this?
 
T

tina

aawww....you're very welcome :)


Jake said:
Hi Tina,

Thanks for that insight, I really appreciate it. You are a wonderful person
and extremely helpful!

tina said:
i'm looking at the ContactManagement template database that shipped with
Access 2003 (the database is in A2000 file format). if it's not the exact
same version you're looking at, it's probably very similar - so if the
object names i refer to are not exactly the same as what you see, just roll
with it.

open the Calls form in design view. on the toolbar, look at the Object
droplist which lists every object in the form. click the down arrow to look
at the list; you'll see "CallID" listed. select that name from the list, and
you'll see that you've selected an unbound textbox control in the main form,
which is almost hidden by the top subform. look at the control's properties
and you'll see that the ControlSource property is

=[Call Listing Subform].form!CallID

so the value of the CallID textbox on the main form is always equal to the
CallID primary key field in the first subform, named Call Listing Subform.

now click on the bottom subform, named Call Details Subform. the
LinkChildFields and LinkMasterFields both show the same field name - CallID.
in LinkChildFields, CallID refers to the primary key of the Calls table
which the subform is bound to. in LinkMasterFields, however, CallID refers
to the textbox control named CallID on the main form.

this is a standard method of *indirectly* linking two subforms within a main
form - this same setup can be used to link a subform bound to a "child"
table to another subform bound to its' "parent" table, again, both on the
same main form. it would be easier to understand what's happening if the
unbound textbox control on the main form were named "txtCallID", rather than
"CallID"; for that reason, i always put a "txt" prefix on the name of the
linking control in the main form when i use this solution myself.

hth


Jake said:
There is a template in the access templates downloads that I was quite
impressed with. He has a form tab in a contact management database called
"Calls" Under this tab, in the form there are two subforms. One is a "Calls
List Subform" and the other is a "Calls Details Subform" The "Calls Details
Subform" is the notes field from the "Calls" Table. Here is the tricky
part...when you click into a record in the 'Calls List Subform" is
shows
the
"notes" field and info related to that record, and when you go to the next
record, the "Calls Details Subform" demonstrates those notes
associated
with
that record...how in the hell were they able to do this?
 

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