Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

Subform field on the form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 15 Jul 2007 18:46 GMT
Hi

Is there a way to put a text box on the form which is driven by a
subform for that form? In this instance, the subform displays a child
record which represents an actual child. The users would like to see
the child name at the top of the form, directly under the mother's
name (which is part of the form.) I know that you can do this with
another related subform, but I wanted to know if it could be done on
the form itself.

Thanks

Jeff
tina - 15 Jul 2007 19:15 GMT
you can use an unbound textbox control on the main (parent's) form, to
display a value from the subform (child records). add the following
expression to the textbox control's ControlSource property, as

=[SubformControlName].[Form]![ControlOnSubform]

replace SubformControlName with the correct name of the subform "container"
control within the main form. make sure you use the subform control name,
not the name of the subform as it shows in the Forms tab of the database
window - sometimes the two names are the same, but sometimes not.

replace ControlOnSubform with the name of the control, within the subform,
that holds the child's name. if the name is in two or three fields (first,
middle, last names) then concatenate those fields into the above expression,
as

=[SubformControlName].[Form]![FirstNameControl] & " " &
[SubformControlName].[Form]![MiddlenameControl] & " " &
[SubformControlName].[Form]![LastNameControl]

the above goes all on one line in the textbox's ControlSource property,
regardless of linewrap in this post.

hth

> Hi
>
[quoted text clipped - 9 lines]
>
> Jeff
Jeff - 16 Jul 2007 01:35 GMT
Thanks Tina.

That works. We had talked once before, and I hadn't been able to make
it work at that time. Now that the field exists on the form, I'm
trying to use it as a LinkMaster field to work with another subform.
However, whenever I try to put the name of the textbox on the form
into the LinkMaster box, I get a message saying that the item isn't in
the list.

Could you help again?

Thanks

Jeff
tina - 16 Jul 2007 02:14 GMT
sounds like you're clicking the Build button (...) at the right side of the
LinkMasterFields property line, and attempting to work in the Subform Field
Linker dialog box. don't do that; just type the control name(s) directly in
the LinkMasterFields and LinkChildFields property lines.

hth

> Thanks Tina.
>
[quoted text clipped - 10 lines]
>
> Jeff
Jeff - 16 Jul 2007 11:12 GMT
Yes, I was using Build. Thanks. It now lets me add the field to the
LinkChild/LinkMaster fields. I feel like I'm getting very close to
this.

However, now the subform displays #Name? for the names which should
match (I went out and did some displays and found that the fields
match, so that's not the issue.) Any thoughts?

Thanks

Jeff
tina - 17 Jul 2007 04:28 GMT
> However, now the subform displays #Name? for the names which should
> match

it's not clear which subform you're talking about here. and if you're trying
to link subformB to subformA by using a calculated control on the main form,
and if the calculated control contains a concatenation of two or three
fields from subformA - then you must have an identical calculated field in
subformB. you can't take two fields "hooked together" and try to match the
single resulting value to two *separate* fields.

how about explaining in detail exactly what you're trying to accomplish with
these two subforms on this main form, and how you're going about doing it.
then hopefully we can talk specifics, rather than a lot of "if...then...but
if instead....then...", etc, etc.

hth

> Yes, I was using Build. Thanks. It now lets me add the field to the
> LinkChild/LinkMaster fields. I feel like I'm getting very close to
[quoted text clipped - 7 lines]
>
> Jeff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.