A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup in subform



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2010, 07:26 PM posted to microsoft.public.access.forms
Basenji
external usenet poster
 
Posts: 61
Default Lookup in subform

Using Access 2003 I have a table of medical practices and a table of
physicians and the corresponding forms. The form for the physicians is a
subform in the form for practices as one practice can have multiple
physicians. A lookup was created to find the practices in the form. Now a
lookup is needed for physicians. What is the best way to create a lookup for
a physician (whose information is in the subform) and have it sychronize to
the correct the practice form?
  #2  
Old January 4th, 2010, 11:11 PM posted to microsoft.public.access.forms
theDBguy[_2_]
external usenet poster
 
Posts: 29
Default Lookup in subform

Hi,

In the RowSource for your combobox, you could have something like:

SELECT ID, FirstName, LastName
FROM tblPhysicians
WHERE PracticeID = Forms!MainFormName.PracticeID

Please modify to suit your object and field names.

Hope that helps..


"Basenji" wrote:

Using Access 2003 I have a table of medical practices and a table of
physicians and the corresponding forms. The form for the physicians is a
subform in the form for practices as one practice can have multiple
physicians. A lookup was created to find the practices in the form. Now a
lookup is needed for physicians. What is the best way to create a lookup for
a physician (whose information is in the subform) and have it sychronize to
the correct the practice form?

  #3  
Old January 11th, 2010, 07:40 PM posted to microsoft.public.access.forms
Basenji
external usenet poster
 
Posts: 61
Default Lookup in subform

Okay, I have created an unbound combo box in the header of my form. The row
source is SELECT ID AS Expr 1,
tblPhysiciansNursePractioners.LastName,tblPhysicia nsNursePractioners.FirstName FROM tblPhysiciansNursePractioners
WHERE
(((tblPhysiciansNursePractioners.PracticeID)=[Forms]![frmPractices].[PracticesID]));

Now I am getting an Enter Parameter Value. What needs to change in order to
have a lookup for a physician's name so that his practice can be found, when
the practice is not known?

"theDBguy" wrote:

Hi,

In the RowSource for your combobox, you could have something like:

SELECT ID, FirstName, LastName
FROM tblPhysicians
WHERE PracticeID = Forms!MainFormName.PracticeID

Please modify to suit your object and field names.

Hope that helps..


"Basenji" wrote:

Using Access 2003 I have a table of medical practices and a table of
physicians and the corresponding forms. The form for the physicians is a
subform in the form for practices as one practice can have multiple
physicians. A lookup was created to find the practices in the form. Now a
lookup is needed for physicians. What is the best way to create a lookup for
a physician (whose information is in the subform) and have it sychronize to
the correct the practice form?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.