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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box



 
 
Thread Tools Display Modes
  #1  
Old January 31st, 2006, 11:13 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Combo Box

I've a form namely "Transection" and in that form there are two combo
boxes. One of them is listing all the Brand names (Motorola, LG, TCL
etc...) and the other one listing all the model numbers for those
brands. Both are getting information from different tables for brand
and model numbers independently. Now. in the form when I select
"Motorola" brand, the other combo box with the model numbers should
show only a list of selected brand's model numbers. How can I have this
done? Hope my poor english is enough for you to understand my query and
awaiting for your help urgently, please.

  #2  
Old January 31st, 2006, 12:08 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Combo Box

Sazed wrote:

I've a form namely "Transection" and in that form there are two combo
boxes. One of them is listing all the Brand names (Motorola, LG, TCL
etc...) and the other one listing all the model numbers for those
brands. Both are getting information from different tables for brand
and model numbers independently. Now. in the form when I select
"Motorola" brand, the other combo box with the model numbers should
show only a list of selected brand's model numbers. How can I have this
done?



Here's a short article that explains it.
http://www.mvps.org/access/forms/frm0028.htm

--
Marsh
MVP [MS Access]
  #3  
Old February 6th, 2006, 10:31 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Combo Box

doesnt work! after inputing the suggested following code it askes for
"peremeter value"

Private Sub cbxCombo1_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!cbxCombo1
strSQL = strSQL & " from Categories"
Me!cbxCombo2.RowSourceType = "Table/Query"
Me!cbxCombo2.RowSource = strSQL
End Sub

what to do now?

  #4  
Old February 6th, 2006, 07:21 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Combo Box

Sazed wrote:

doesnt work! after inputing the suggested following code it askes for
"peremeter value"

Private Sub cbxCombo1_AfterUpdate()
Dim strSQL As String
strSQL = "Select " & Me!cbxCombo1
strSQL = strSQL & " from Categories"
Me!cbxCombo2.RowSourceType = "Table/Query"
Me!cbxCombo2.RowSource = strSQL
End Sub



You used the wrong part of the article. Then second part
explains that the model combo box's RowSource query should
use a criteria that refers to the brand combo box.

SELECT modelname
FROM models
WHERE brand = Forms!Transection.cboBrands

Don't forget the Requery code in both the brands combo box's
AfterUpdate event and in the form's Current event.

Be sure to replace the names I used with the ones you have
in your form and double check their spelling.

--
Marsh
MVP [MS Access]
 




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
Hidden Power of the Combo Box JethroUK© New Users 2 October 24th, 2005 09:18 AM
Hidden Power of the Combo Box JethroUK© Using Forms 2 October 24th, 2005 09:18 AM
Displaying Additional Columns in Access Form Roxanne General Discussion 3 September 20th, 2005 06:50 PM
COMBO BOX transfer of info Philip from Malta Europe Using Forms 0 July 6th, 2005 09:52 AM
Combo box value determined by the value of another combo box LouD General Discussion 8 July 9th, 2004 08:45 PM


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