Combobox multiple row sources

bdj1987

New member
Local time
Today, 19:55
Joined
Oct 3, 2013
Messages
4
Hi all,

I am creating a form in my database and adding a combobox. In the row source for this i have the following:

SELECT [Parts List FY08].[Case Qty], [Parts List FY08].Alloy, [Parts List FY08].Customer, [Parts List FY08].[Die Number], [Parts List FY08].DesignID FROM [Parts List FY08] ORDER BY [Parts List FY08].[Die Number];

The reason i have five row source elements is when the person filling in the form selects the 'Die Number' from the combobox it then automatically fills in the 'Case Qty', 'Alloy' and 'Customer' fields on the form that are then saved to a table upon closing the form.

When the person filling in the form clicks the combobox i only want them to be able to see the data from the 'Die Number' row source.
I had this working once but seem to have accidently changed something and saved the change and now it isn't working.

Could anyone offer me any pointers?

I have tried a few things to do with 'columnwidths' on the 'Format' tab and 'Bound Column' on the 'Data' tab. But at the moment the only source i can see in my combobox is 'Case Qty'. :banghead:

Thanks in advance.
 
Sounds like you want the Column Widths property. A width of 0 hides the field.
 
Hi, thanks for you reply. I thought it was the column with but it doesn't seem to be working for some reason.

If i put '0cm;2.561cm' in the column widths property for example it will show only show me the 'Alloy' field which makes sense as 'Case Qty' is set to '0' so hidden and then 'Alloy' shows.

So following this logic i put in '0cm;0cm;0cm;2.561cm' hoping it would hide 'Case Qty', 'Alloy' and 'Customer' and then show 'Die Number' but it isn't it is just blank with nothing to select.

I would just move 'Die Number' to the front as i tried this and it worked but i cant as i have some code in the background set for 'After Update' which reads:

Private Sub dienocmbo_AfterUpdate()

Me.Case_Qty = Me.dienocmbo.Column(0)
Me.Alloy = Me.dienocmbo.Column(1)
Me.Customer = Me.dienocmbo.Column(2)

End Sub

this does the autofilling on the form for me.
 
What is the column count property?
 
Ahha, it was set to 2 which explains everything, lesson learnt!

Thank you!:D
 

Users who are viewing this thread

Back
Top Bottom