changing combobox option (1 Viewer)

hardik_088

Registered User.
Local time
Today, 02:28
Joined
May 31, 2011
Messages
82
hi guys,
i have form it contains three combobox

1 is type and it contains three option Laptop,Printer,Software
2 is description and it contains options are dell,hp,acer,intel,mac etc...
3 is part number and it ontains option are h001,d001,p005,nh902 etc...

now if i select Laptops from type combo box then in description combobox i want to see just dell,hp option and part number d001,h001

if i choose Printer from type then it should display option just intel,mac

Means I want to change value of second combobox depend on first combo box.

So what I should do

Thanks a lot
 
Local time
Today, 19:28
Joined
Aug 8, 2010
Messages
245
This is called synchronised combos.
Do a search on Access World Forums for 'synchronise combo' and you will find plenty of posts about this.
 

hardik_088

Registered User.
Local time
Today, 02:28
Joined
May 31, 2011
Messages
82
hi ,
i have following tables and in my form i have type field is combobox and i want to see option there Laptops,Licences ,peripherals .
so i have written in row source sql query like (select Laptops.type,Licences.type,peripherals.type from laptops,licences,peripherals) then it showing options four times laptops,licences and peripherals but i want to see just one time and i also tried to put distinct but when i put then it showing just laptops option. so what i should do?
Laptops
[serial number]--Type---[Purchase Requisition]---Location---[SuggestedSupplier]
1--Laptops--97663--PCH--Dell
2--Laptops-108617--PCH--Dell
3--Laptops--119805--AHR--Dell
4--Laptops--120002--PCH--hp

Licences
[serial number]--Type---[Purchase Requisition]---Location---[SuggestedSupplier]
1--Licenses--97677--PCH--BMC
2--Licenses--0503TY201--AHR--KnowWare
3--Licenses--03370--NLH--Xerox

Peripherals
1--Peripherals--87628--AHR--Dons Photo
2--Peripherals--25879--AHR--Dell
3--Peripherals--97674PCH--Dell
4--Peripherals--84419--NLH--Microserve

Thanks a lot
 
Last edited:

missinglinq

AWF VIP
Local time
Today, 05:28
Joined
Jun 20, 2003
Messages
6,420
As Bob said, the concept is commonly called "cascading comboboxes" although the exact same thing applies to Listboxes with the MultiSelect Property set to None, and the code is interchangeable. Here are a couple of links with examples:

http://www.fontstuff.com/access/acctut10.htm

http://bytes.com/forum/thread605958.html

If you Google the term along with the "Access" you'll probably get a gazillion hits!

Linq ;0)>
 
Local time
Today, 19:28
Joined
Aug 8, 2010
Messages
245
Easy way is to create a table called tblEquipment - autonumber primary key and a text field for the equipment type. It will have 3 rows - laptop, licence and peripherals - and you can add more rows later if you get different equipment types.

Use tblEquipment to create the sql for the first combo's row source.

Search for posts on synchronised or cascading combos to help you do the next combo. Post back if you need further help.
 

Users who are viewing this thread

Top Bottom