My Assistant
![]() ![]() |
|
|
Mar 24 2010, 08:38 AM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 60 |
i have a DB, and a few tables, there is an autoID wich is the primary key. on my main interface i have a subform that grabs data from a second table. the problem i am having, is getting the subform to pickup the proper Data from the secondary table. in the second table if i enter A "1" in the If field, and then refresh my subform the data will pickup, but instead of this, i want the data to be picked up by the account number instead of auto Id, how can i accomplish this. like if i put the account number(44B77) in cell1 of table 2 and refresh the subform the data is not visible, but if i change the account# to 1, then the proper data shoes?!
Thanks in advance.. serge |
|
|
|
Mar 24 2010, 09:11 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 23,583 From: Mississippi |
i have a DB, and a few tables, there is an autoID wich is the primary key. on my main interface i have a subform that grabs data from a second table. the problem i am having, is getting the subform to pickup the proper Data from the secondary table. in the second table if i enter A "1" in the If field, and then refresh my subform the data will pickup, but instead of this, i want the data to be picked up by the account number instead of auto Id, how can i accomplish this. like if i put the account number(44B77) in cell1 of table 2 and refresh the subform the data is not visible, but if i change the account# to 1, then the proper data shoes?! Thanks in advance.. serge You need to tell the subform control which field to use when it fetches the corresponding record. Open the form containing the subform control in design view. Click the thick border around the subform control. Then click the Properties button. The properties you are interested in are the Link Master Fields and Link Child Fields properties. |
|
|
|
Mar 24 2010, 09:14 AM
Post
#3
|
|
|
Access Wiki and Forums Moderator Posts: 48,113 From: SoCal, USA |
Hi serge,
(IMG:style_emoticons/default/welcome2UA.gif) Proper relationship between a parent and child table should always be based on the Primary key of the parent table. However, if you want your subform to be linked to the account#, then you could modify the Link Master/Child Fields for your subform to show the account# field instead of the primary key. Hope that helps... EDIT: Oops, I guess Frank beat me to it. Sorry for the duplicate information. This post has been edited by theDBguy: Mar 24 2010, 09:15 AM |
|
|
|
Mar 24 2010, 10:08 AM
Post
#4
|
|
|
UtterAccess Enthusiast Posts: 60 |
Excelent, i think this os something i might have overlooked, thank you both, (IMG:style_emoticons/default/smile.gif) , worked great.
|
|
|
|
Mar 24 2010, 10:11 AM
Post
#5
|
|
|
Access Wiki and Forums Moderator Posts: 48,113 From: SoCal, USA |
Excelent, i think this os something i might have overlooked, thank you both, (IMG:style_emoticons/default/smile.gif) , worked great. (IMG:style_emoticons/default/yw.gif) Frank and I are happy to help. Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 06:29 AM |