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 / New Users / January 2005

Tip: Looking for answers? Try searching our database.

Linking  forms  & tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
william072@hotmail.com - 31 Jan 2005 13:58 GMT
HI

Being pretty new to Access, can any one help with linking
a form and sub form. I have created a form that has basic
HR data  and another form that has the training carried
out.  The common unique link between the two is the
employee number.  Although I can create a command button
to open the training form how do I get it to always link
it to the current employee I am viewing on the HR form.  
Also is it possible to just display the training that
particular employee has taken and not show all the
training columns

Any assistance  would be greatly appreciated
Rick Brandt - 31 Jan 2005 14:26 GMT
> HI
>
[quoted text clipped - 10 lines]
>
> Any assistance  would be greatly appreciated

What you have is a popup form not a subform.  The term "subform" refers to a
form that is embedded within another form using a subform control.  This
control has two properties MasterLink and ChildLink that provide the "link"
you are seeking.

If you open a separate form outside the main form you can easily cause the
second form to open filtered to only show the records related to the main
form (this is one of the options for a command button in the wizard), but
this will not provide any automatic linking should you decide to add new
records to the second form.

If the second form will *only* be used in this manner (being called from the
other) then you can set the DefaultValue property for the common fields to
something like...

=Forms!NameOfMainForm!NameOfLinkedField

...and you will get the same effect as you would with a proper subform.  If
you sometimes use the second form when the main form will not be open, then
you would have to leave the DefaultValue properties blank and assign them in
code when you open the form from the first one.

Signature

I don't check the Email account attached
to this message.     Send instead to...
RBrandt    at       Hunter      dot      com

 
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



©2008 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.