Combobox only cascading to one textbox

AdamAA

Registered User.
Local time
Today, 03:46
Joined
Aug 18, 2012
Messages
24
Hi all,

I have a form with the combobox "PartName" and textboxes: "PartNumber", "LeadTime", and "PriceExVAT"

The RowSource of the PartName combobox is:
Code:
SELECT VesselsItems.PartName, VesselsItems.PartNumber, VesselsItems.LeadTime, VesselsItems.PriceExludingVAT FROM VesselsItems ORDER BY VesselsItems.PartName;

I have code in the AfterUpdate event for PartName which is:
Code:
Me.PartNumber = Me.PartName.Column(1)
Me.LeadTime = Me.PartName.Column(2)
Me.PriceExVAT = Me.PartName.Column(3)

Now on change of PartName it pulls through the relevant information only to PartNumber. It doesn't pull through to LeadTime or PriceExVAT.

I've double checked and there are values there to be pulled through, but only the first line of my AfterUpdate code seems to work. Any fix for this? Thanks in advance.
 
Make sure the column count property of the combo is 4.
 
Ah okay thanks that makes sense.

Just tried it and all 4 columns are displaying when I select the combo field. Is there a way to display just the one column? Thanks again!
 
That's controlled by the column widths property. 0 = hidden.
 

Users who are viewing this thread

Back
Top Bottom