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  

Limit lookup results by relation to current record



 
 
Thread Tools Display Modes
  #1  
Old October 7th, 2009, 01:25 PM posted to microsoft.public.access.forms
RobertB
external usenet poster
 
Posts: 6
Default Limit lookup results by relation to current record

Hi,

I've got a database with three tables, A, B, C.

Table A has an ID field and a name
Table B has a field related to table A ID and a value lookup to table C
Table C has a field related to table A ID and a value field

When presenting table B's subform, I want to limit a combo box drop down to
only those records in table C that are related to the record in table A that
the person is currently editing. I can't seem to solve that. I can easily
include all of the records in table C in the drop down, but not limit it to
what's related to the current record in table A.

Thanks!
  #2  
Old October 9th, 2009, 06:56 PM posted to microsoft.public.access.forms
Larry Linson
external usenet poster
 
Posts: 3,112
Default Limit lookup results by relation to current record


"RobertB" wrote in message
...
Hi,

I've got a database with three tables, A, B, C.

Table A has an ID field and a name
Table B has a field related to table A ID and a value lookup to table C
Table C has a field related to table A ID and a value field

When presenting table B's subform, I want to limit a combo box drop down
to
only those records in table C that are related to the record in table A
that
the person is currently editing. I can't seem to solve that. I can
easily
include all of the records in table C in the drop down, but not limit it
to
what's related to the current record in table A.


The query you use for the Combo Box row source must refer to a field on the
form that contains the ID of the record currently being displayed in its
Criteria. You may (or may not, I'm too lazy right now to check) have to
Requery the Combo in the Form's Current event.

Larry Linson
Microsoft Office Access MVP



 




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 09:55 AM.


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