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  

Help Creating Form



 
 
Thread Tools Display Modes
  #1  
Old March 11th, 2010, 06:38 AM posted to microsoft.public.access.forms
rnjalston
external usenet poster
 
Posts: 1
Default Help Creating Form

I have 5 tables: Manufacturers, Products, Brands, Varieties, Sizes.

I would like a combobox Manufacturer that would filter a Products combobox
that would in turn filter a Brands combobox. After selecting a Brand from
the Brand combobox, I need to enter several Varieties for each Brand and
several Sizes (Size, Unit, Pkg) for each Variety.

Please help. I am new to this. I have the relations set in the order that
the tables appear on the 1st line of this post.

  #2  
Old March 11th, 2010, 07:01 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Help Creating Form

On Thu, 11 Mar 2010 06:38:14 GMT, "rnjalston" u58689@uwe wrote:

I have 5 tables: Manufacturers, Products, Brands, Varieties, Sizes.

I would like a combobox Manufacturer that would filter a Products combobox
that would in turn filter a Brands combobox. After selecting a Brand from
the Brand combobox, I need to enter several Varieties for each Brand and
several Sizes (Size, Unit, Pkg) for each Variety.

Please help. I am new to this. I have the relations set in the order that
the tables appear on the 1st line of this post.


This is a pretty common situation; the solution is what's often called
"conditional combo boxes".

On your Form, put a Manufacturer combo box (cboMfgr let's call it). It should
have the ManufacturerID as the bound column (it probably will anyway if you're
using it to update the manufacturer field in the form's recordsource).

Create a Query as the rowsource for the Product combo. I presume that the
Products table contains a ManufacturerID; if so, use

=[Forms]![YourFormNameHere]![cboMfgr]

as a criterion on the field. This will limit the Product combo box to products
from this manufacturer.

You will need one line of code, or a macro, in the AfterUpdate event of
cboMfgr; it needs to Requery cboProduct.

Repeat this process at each link of the chain.

--

John W. Vinson [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 12:24 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.