Question Problem with Select statement on form

jjarman

Registered User.
Local time
Today, 10:53
Joined
Aug 15, 2012
Messages
26
Kind of a wierd problem using the Select statement on a form;
I have it looking up 3 fields, Ordered by the first and bound by the first.the other 2 are being stored in different fields.
What is weird is that I need to have the first field entered twice in order for it to show up, which means I'm looking up 4 fields.
When I go to store the selection after, only 2 are available... know this confusing; here is the Select Statement;

SELECT [ITEM CODE1].[ItemCode],[ItemCode],[Customer],[Project Description] FROM [ITEM CODE1] ORDER BY [ITEM CODE1].[ItemCode] ;

If I don't type ItemCode twice, it shows Project Description in the drop down box. When I use the code above, only ItemCode and Customer are available to store in other fields;

Me.Customer = Me.ComID.Column(2) which actually stores Customer (should be column 3)

Column(3) and Column(4) won't do anything.

If I haven't confused everyone, I could use some help :)
 
Look for the properties called Column Count and Column Widths of the combo box and tell us their values.
 
You need to check the the Column Count and Column Widths properties of your combo (or list) box. If have three columns returned by the query then Column Count should be 3. The Column Widths should be set according to which column you want displayed, for example;

Column Count: 3
Column Widths: 0", 1", 0"

Me.Customer = Me.ComID.Column(2) which actually stores Customer (should be column 3)

No. It's a zero based index, so the first column is Column(0), the second is Column(1), etc.
 
The column count is set to 2, the widths were 0",1".

I have now changed the column count to 3, and the width's to 1,0,0
Bound to Column 1.

There are a lot of smart people in the world, Thanks for the help!! :)
 

Users who are viewing this thread

Back
Top Bottom