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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Boxes



 
 
Thread Tools Display Modes
  #1  
Old June 21st, 2005, 01:08 PM
pompeyjim
external usenet poster
 
Posts: n/a
Default Combo Boxes

I have a subform which has several combo boxes on it. The first combo box
provides the name of a product. Each product has several grades. The products
are in one table (tblProduct) with fields ProductID (Autonumber) and Product.
The second combo box provides the names of product grades. Grades are in
tblGrades and have ProductID and Grades. It is a one to many relationship
(tblProducts being the one side tblGrades being the many side. After I have
chosen the product, the Grades combo box shows all the grades from all the
products. How can I get it to show only the grades from the product I have
chosen from the combo box?
  #2  
Old June 21st, 2005, 01:16 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID = Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change event of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first combo box
provides the name of a product. Each product has several grades. The
products
are in one table (tblProduct) with fields ProductID (Autonumber) and
Product.
The second combo box provides the names of product grades. Grades are in
tblGrades and have ProductID and Grades. It is a one to many relationship
(tblProducts being the one side tblGrades being the many side. After I
have
chosen the product, the Grades combo box shows all the grades from all the
products. How can I get it to show only the grades from the product I have
chosen from the combo box?



  #3  
Old June 21st, 2005, 03:21 PM
pompeyjim
external usenet poster
 
Posts: n/a
Default



"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID = Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change event of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first combo box
provides the name of a product. Each product has several grades. The
products
are in one table (tblProduct) with fields ProductID (Autonumber) and
Product.
The second combo box provides the names of product grades. Grades are in
tblGrades and have ProductID and Grades. It is a one to many relationship
(tblProducts being the one side tblGrades being the many side. After I
have
chosen the product, the Grades combo box shows all the grades from all the
products. How can I get it to show only the grades from the product I have
chosen from the combo box?



Thanks Lynn but it is still not working. I know it does work because I have used it several times before on different DBs. I have also used it on this DB in the main form to get customer addresses. All that happens is a "Enter Parameter Value" box appears with "Forms!frmOrders.Forms!fsubCategories!Product" written on it. When I enter the correct ProductID number it shows the corresponding grades. If I cancel it, it shows nothing.

  #4  
Old June 21st, 2005, 03:41 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

Trying changing Forms!frmOrders.Forms!fsubCategories!Product to:

Forms!frmOrders.Form!fsubCategories!Product

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...


"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID = Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change event of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first combo
box
provides the name of a product. Each product has several grades. The
products
are in one table (tblProduct) with fields ProductID (Autonumber) and
Product.
The second combo box provides the names of product grades. Grades are
in
tblGrades and have ProductID and Grades. It is a one to many
relationship
(tblProducts being the one side tblGrades being the many side. After I
have
chosen the product, the Grades combo box shows all the grades from all
the
products. How can I get it to show only the grades from the product I
have
chosen from the combo box?



Thanks Lynn but it is still not working. I know it does work because I
have used it several times before on different DBs. I have also used it
on this DB in the main form to get customer addresses. All that happens
is a "Enter Parameter Value" box appears with
"Forms!frmOrders.Forms!fsubCategories!Product" written on it. When I
enter the correct ProductID number it shows the corresponding grades. If
I cancel it, it shows nothing.



  #5  
Old June 21st, 2005, 04:33 PM
pompeyjim
external usenet poster
 
Posts: n/a
Default

No it's still not working. I've even tried it in VB with
"Forms!fsubCategories.Grade.Column(1) =
Form!fsubCategories.Product.Column(0)" but it comes up with the error message
"Can't find the field fsubCategories referred to in your expression" and I've
tried "Form_fsubCategories.Grade.Column(1) =
Form_fsubCategories.Product.Column(0)" But then I get the error message
"Object Required". There are several other variations of the above code I've
tried with similar results on all of them.

"Lynn Trapp" wrote:

Trying changing Forms!frmOrders.Forms!fsubCategories!Product to:

Forms!frmOrders.Form!fsubCategories!Product

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...


"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID = Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change event of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first combo
box
provides the name of a product. Each product has several grades. The
products
are in one table (tblProduct) with fields ProductID (Autonumber) and
Product.
The second combo box provides the names of product grades. Grades are
in
tblGrades and have ProductID and Grades. It is a one to many
relationship
(tblProducts being the one side tblGrades being the many side. After I
have
chosen the product, the Grades combo box shows all the grades from all
the
products. How can I get it to show only the grades from the product I
have
chosen from the combo box?


Thanks Lynn but it is still not working. I know it does work because I
have used it several times before on different DBs. I have also used it
on this DB in the main form to get customer addresses. All that happens
is a "Enter Parameter Value" box appears with
"Forms!frmOrders.Forms!fsubCategories!Product" written on it. When I
enter the correct ProductID number it shows the corresponding grades. If
I cancel it, it shows nothing.




  #6  
Old June 21st, 2005, 04:47 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

Let me suggest that you change the name of your Product combo box to
cboProduct and then change the record source criteria as follows:

Forms!frmOrders.Form!fsubCategories!cboProduct

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
No it's still not working. I've even tried it in VB with
"Forms!fsubCategories.Grade.Column(1) =
Form!fsubCategories.Product.Column(0)" but it comes up with the error
message
"Can't find the field fsubCategories referred to in your expression" and
I've
tried "Form_fsubCategories.Grade.Column(1) =
Form_fsubCategories.Product.Column(0)" But then I get the error message
"Object Required". There are several other variations of the above code
I've
tried with similar results on all of them.

"Lynn Trapp" wrote:

Trying changing Forms!frmOrders.Forms!fsubCategories!Product to:

Forms!frmOrders.Form!fsubCategories!Product

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...


"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID =
Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change event
of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first combo
box
provides the name of a product. Each product has several grades. The
products
are in one table (tblProduct) with fields ProductID (Autonumber) and
Product.
The second combo box provides the names of product grades. Grades
are
in
tblGrades and have ProductID and Grades. It is a one to many
relationship
(tblProducts being the one side tblGrades being the many side. After
I
have
chosen the product, the Grades combo box shows all the grades from
all
the
products. How can I get it to show only the grades from the product
I
have
chosen from the combo box?


Thanks Lynn but it is still not working. I know it does work because I
have used it several times before on different DBs. I have also used
it
on this DB in the main form to get customer addresses. All that
happens
is a "Enter Parameter Value" box appears with
"Forms!frmOrders.Forms!fsubCategories!Product" written on it. When I
enter the correct ProductID number it shows the corresponding grades.
If
I cancel it, it shows nothing.






  #7  
Old June 21st, 2005, 05:09 PM
pompeyjim
external usenet poster
 
Posts: n/a
Default

No It still doesn't want to know. I think I'm going to have change a few
things in the actual DB.
Thanks very much for your help. It is much appreciated.
Jim

"Lynn Trapp" wrote:

Let me suggest that you change the name of your Product combo box to
cboProduct and then change the record source criteria as follows:

Forms!frmOrders.Form!fsubCategories!cboProduct

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
No it's still not working. I've even tried it in VB with
"Forms!fsubCategories.Grade.Column(1) =
Form!fsubCategories.Product.Column(0)" but it comes up with the error
message
"Can't find the field fsubCategories referred to in your expression" and
I've
tried "Form_fsubCategories.Grade.Column(1) =
Form_fsubCategories.Product.Column(0)" But then I get the error message
"Object Required". There are several other variations of the above code
I've
tried with similar results on all of them.

"Lynn Trapp" wrote:

Trying changing Forms!frmOrders.Forms!fsubCategories!Product to:

Forms!frmOrders.Form!fsubCategories!Product

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...


"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID =
Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change event
of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first combo
box
provides the name of a product. Each product has several grades. The
products
are in one table (tblProduct) with fields ProductID (Autonumber) and
Product.
The second combo box provides the names of product grades. Grades
are
in
tblGrades and have ProductID and Grades. It is a one to many
relationship
(tblProducts being the one side tblGrades being the many side. After
I
have
chosen the product, the Grades combo box shows all the grades from
all
the
products. How can I get it to show only the grades from the product
I
have
chosen from the combo box?


Thanks Lynn but it is still not working. I know it does work because I
have used it several times before on different DBs. I have also used
it
on this DB in the main form to get customer addresses. All that
happens
is a "Enter Parameter Value" box appears with
"Forms!frmOrders.Forms!fsubCategories!Product" written on it. When I
enter the correct ProductID number it shows the corresponding grades.
If
I cancel it, it shows nothing.






  #8  
Old June 21st, 2005, 05:42 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

Well, without seeing your database, I don't know if I can suggest more.
Perhaps others here may see something that I missed.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
news
No It still doesn't want to know. I think I'm going to have change a few
things in the actual DB.
Thanks very much for your help. It is much appreciated.
Jim

"Lynn Trapp" wrote:

Let me suggest that you change the name of your Product combo box to
cboProduct and then change the record source criteria as follows:

Forms!frmOrders.Form!fsubCategories!cboProduct

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
No it's still not working. I've even tried it in VB with
"Forms!fsubCategories.Grade.Column(1) =
Form!fsubCategories.Product.Column(0)" but it comes up with the error
message
"Can't find the field fsubCategories referred to in your expression"
and
I've
tried "Form_fsubCategories.Grade.Column(1) =
Form_fsubCategories.Product.Column(0)" But then I get the error message
"Object Required". There are several other variations of the above code
I've
tried with similar results on all of them.

"Lynn Trapp" wrote:

Trying changing Forms!frmOrders.Forms!fsubCategories!Product to:

Forms!frmOrders.Form!fsubCategories!Product

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...


"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID =
Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change
event
of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first
combo
box
provides the name of a product. Each product has several grades.
The
products
are in one table (tblProduct) with fields ProductID (Autonumber)
and
Product.
The second combo box provides the names of product grades. Grades
are
in
tblGrades and have ProductID and Grades. It is a one to many
relationship
(tblProducts being the one side tblGrades being the many side.
After
I
have
chosen the product, the Grades combo box shows all the grades
from
all
the
products. How can I get it to show only the grades from the
product
I
have
chosen from the combo box?


Thanks Lynn but it is still not working. I know it does work
because I
have used it several times before on different DBs. I have also
used
it
on this DB in the main form to get customer addresses. All that
happens
is a "Enter Parameter Value" box appears with
"Forms!frmOrders.Forms!fsubCategories!Product" written on it. When
I
enter the correct ProductID number it shows the corresponding
grades.
If
I cancel it, it shows nothing.








  #9  
Old June 21st, 2005, 05:58 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

Looks as if the poster did not strictly follow your recommendations
regarding use of ! not . in the suggested code. His last post indicates that
he left out the .Form. between the subform name and the control name. And
he's trying to set the "value" of the second column in the combo box's
RowSource to a value from the first column -- I don't think that can be
done.

--

Ken Snell
MS ACCESS MVP

"Lynn Trapp" wrote in message
...
Well, without seeing your database, I don't know if I can suggest more.
Perhaps others here may see something that I missed.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
news
No It still doesn't want to know. I think I'm going to have change a few
things in the actual DB.
Thanks very much for your help. It is much appreciated.
Jim

"Lynn Trapp" wrote:

Let me suggest that you change the name of your Product combo box to
cboProduct and then change the record source criteria as follows:

Forms!frmOrders.Form!fsubCategories!cboProduct

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
No it's still not working. I've even tried it in VB with
"Forms!fsubCategories.Grade.Column(1) =
Form!fsubCategories.Product.Column(0)" but it comes up with the error
message
"Can't find the field fsubCategories referred to in your expression"
and
I've
tried "Form_fsubCategories.Grade.Column(1) =
Form_fsubCategories.Product.Column(0)" But then I get the error
message
"Object Required". There are several other variations of the above
code
I've
tried with similar results on all of them.

"Lynn Trapp" wrote:

Trying changing Forms!frmOrders.Forms!fsubCategories!Product to:

Forms!frmOrders.Form!fsubCategories!Product

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...


"Lynn Trapp" wrote:

The recordsource for your Grades combo box needs to be:

Select Grades
From tblGrades
Where ProductID =
Forms!YourMainform.Form!YoursubForm!YourProductCom bobox

Then you will need to requery the Grades combobox in the Change
event
of
your Products combobox.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conrad...essjunkie.html



"pompeyjim" wrote in message
...
I have a subform which has several combo boxes on it. The first
combo
box
provides the name of a product. Each product has several grades.
The
products
are in one table (tblProduct) with fields ProductID (Autonumber)
and
Product.
The second combo box provides the names of product grades.
Grades
are
in
tblGrades and have ProductID and Grades. It is a one to many
relationship
(tblProducts being the one side tblGrades being the many side.
After
I
have
chosen the product, the Grades combo box shows all the grades
from
all
the
products. How can I get it to show only the grades from the
product
I
have
chosen from the combo box?


Thanks Lynn but it is still not working. I know it does work
because I
have used it several times before on different DBs. I have also
used
it
on this DB in the main form to get customer addresses. All that
happens
is a "Enter Parameter Value" box appears with
"Forms!frmOrders.Forms!fsubCategories!Product" written on it. When
I
enter the correct ProductID number it shows the corresponding
grades.
If
I cancel it, it shows nothing.










  #10  
Old June 21st, 2005, 09:53 PM
pompeyjim
external usenet poster
 
Posts: n/a
Default

I have managed to sort the problem out. All I did was to write in the
criteria box [cboProduct]. This has seemed to do the trick. I haven't got a
clue why the method you suggested didn't work Lynn. As I said I have used
that method on other DBs before and even on this DB.
Once again, Thanks very much for your help. I owe you one.

"pompeyjim" wrote:

I have a subform which has several combo boxes on it. The first combo box
provides the name of a product. Each product has several grades. The products
are in one table (tblProduct) with fields ProductID (Autonumber) and Product.
The second combo box provides the names of product grades. Grades are in
tblGrades and have ProductID and Grades. It is a one to many relationship
(tblProducts being the one side tblGrades being the many side. After I have
chosen the product, the Grades combo box shows all the grades from all the
products. How can I get it to show only the grades from the product I have
chosen from the combo box?

 




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
Confused about 3 combo boxes esparzaone New Users 1 April 28th, 2005 01:06 PM
Continuous subforms, combo boxes, and making them dependent David Walker Using Forms 3 July 26th, 2004 08:35 PM
Combo Boxes #1 Tom Using Forms 0 June 9th, 2004 03:50 AM
Data Dependencies between Combo Boxes Tom Using Forms 7 June 6th, 2004 05:25 PM
Multiple combo boxes Lee Worksheet Functions 2 May 6th, 2004 02:49 PM


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