473,320 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sychronized Combo Boxes - Mystery of Missing Values

Hello,

I have 2 tables:

Product_List

Product_ID (PK)
Product_Name
Client_ID

and

Client_List

Client_ID (PK)
Client_Name

They are linked from Client_ID in Client_List to Client_ID in
Product_List.

On my form I have 2 combo boxes, the first is unbound and simply looks
up the Client_Names from the Client_List table.

It has an after_update event of:

Private Sub Client_Name_AfterUpdate()

Product_Name.RowSource = "Select Product_Name from Product_List " _
& "where Client_ID=" & Client_Name
End Sub

CB2 (Product_Name) has a record source of Product_Name where I need it
to be stored.

Now this all appears to be working, apart from that when I pull down
on the Product_Name Combo Box the fields are all blank. Even stranger
is that the correct amount of products for that client can be seen by
the amount it highlights as you move the mouse up and down the list!

I've got the bound column set to '2' as that is the product name
column in the table (product_list)

Anyone seen this before, or am I being stupid?!

Much appreciated in advance,

Chris.
Nov 13 '05 #1
1 1211
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If there is only one column in the Product_Name ComboBox you can't set
the Bound Column to 2, it has to be set to 1.

The Product_Name ComboBox's Rowsource is incorrect, 'cuz you're trying
to compare the Client_ID to the Client_Name:

Client_ID Client_Name
25 = "Mary Lou"

Obviously, a number does NOT equal a string.

If you want to store the Product_ID the RowSource property of the
Product_Name ComboBox should be like this:

"SELECT Product_ID, Product_Name FROM Product_List " & _
"WHERE Client_ID=" & Me!Client_ID

You have to have a control named "Client_ID" for that to work.

Then the ComboBox's Properties need to look like this:

Column Count: 2
Column Widths: 0";1.5"
Row Source Type: Table/Query
Bound Column: 1
Limit to List: Yes
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlV4TYechKqOuFEgEQJHJwCg1LmqBfaUK8BNRuQaYjPU4h 1V+RMAn2/r
W7MJMhk8Or6DU89PearqJnu7
=EBoG
-----END PGP SIGNATURE-----
ClarCE wrote:
Hello,

I have 2 tables:

Product_List

Product_ID (PK)
Product_Name
Client_ID

and

Client_List

Client_ID (PK)
Client_Name

They are linked from Client_ID in Client_List to Client_ID in
Product_List.

On my form I have 2 combo boxes, the first is unbound and simply looks
up the Client_Names from the Client_List table.

It has an after_update event of:

Private Sub Client_Name_AfterUpdate()

Product_Name.RowSource = "Select Product_Name from Product_List " _
& "where Client_ID=" & Client_Name
End Sub

CB2 (Product_Name) has a record source of Product_Name where I need it
to be stored.

Now this all appears to be working, apart from that when I pull down
on the Product_Name Combo Box the fields are all blank. Even stranger
is that the correct amount of products for that client can be seen by
the amount it highlights as you move the mouse up and down the list!

I've got the bound column set to '2' as that is the product name
column in the table (product_list)

Anyone seen this before, or am I being stupid?!

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Todd D. Levy | last post by:
I have a table of Country names & Country codes in alphabetical order. This is a lookup table that a number of other tables use to populate the Country field via a drop down Combo Box on the...
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
5
by: Ant | last post by:
Hi, (Winform VS2003) I have a combo box bound to a typed data set. When the form loads, the combo box is popluated using a method containing the simple code below: ------------------------...
2
by: Ausclad | last post by:
How Would you implement this? I have an existing Access application that needs to be converted to .net I am restricted to use the existing database design. One of the areas is a timesheet...
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
1
by: Dave | last post by:
Hello all, First I'd like to apologize...This post was meant to be put in my previous post, but I tried many times without success to reply within my previous post. Now here goes... I have a...
2
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
2
by: ARC | last post by:
I'm testing a user's db that contains a very large number of records. I have an invoice screen, with an invoice select dropdown box that shows all invoices, and the customer's name, etc. With...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.