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 the content of one combo box based on another



 
 
Thread Tools Display Modes
  #1  
Old August 17th, 2005, 07:11 PM
andie
external usenet poster
 
Posts: n/a
Default limit the content of one combo box based on another

I have 3 tables, project, site, and sample. In tblSample the fields Project
and Site look-up their respective tables. tblSite has a field Project that
looks-up tblProject.
I want to make a form with tblSample where the user selects Project then the
Site field is limited to the sites of the selected project.

Here's the current non-working code. Thanks.
SELECT tbl_Site.Site_Name, tbl_Site.Project1 FROM tbl_Site INNER JOIN
tbl_Sample ON tbl_Site.Site_Name=tbl_Sample.Site_Name WHERE
(((tbl_Site.Project1)=Forms!test!Project)) ORDER BY tbl_Site.Site_Name;
  #2  
Old August 18th, 2005, 05:00 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

See:
Limit content of combo/list boxes
at:
http://www.mvps.org/access/forms/frm0028.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"andie" wrote in message
...
I have 3 tables, project, site, and sample. In tblSample the fields
Project
and Site look-up their respective tables. tblSite has a field Project
that
looks-up tblProject.
I want to make a form with tblSample where the user selects Project then
the
Site field is limited to the sites of the selected project.

Here's the current non-working code. Thanks.
SELECT tbl_Site.Site_Name, tbl_Site.Project1 FROM tbl_Site INNER JOIN
tbl_Sample ON tbl_Site.Site_Name=tbl_Sample.Site_Name WHERE
(((tbl_Site.Project1)=Forms!test!Project)) ORDER BY tbl_Site.Site_Name;



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
combo question rob New Users 10 March 21st, 2005 02:05 PM
limit content of combo box based upon field value Daiuy New Users 4 February 10th, 2005 11:00 AM
Limit combo box list only Bruce Using Forms 4 December 22nd, 2004 05:07 PM
Can I limit choices in combo box based on selection in previous bo JeffE General Discussion 1 December 14th, 2004 09:32 PM
Combo field based on a combo field Kyle B. New Users 3 June 4th, 2004 02:14 AM


All times are GMT +1. The time now is 11:54 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.