Auto populate label caption using a combo box in forms (1 Viewer)

awaldrep

New member
Local time
Today, 16:14
Joined
Sep 19, 2019
Messages
2
I am creating a form where in short, a user will input measurements of products for quality inspection. At the moment I have label captions stating what the measurement should be and it's tolerance. The length is the only dimension that changes depending on product. Currently, I have it so the user will select a product from a combobox, and I want the label to update with the length associated with the product. I have a table that lists each products length.

I've attempted writing the following code on the OnChange property for the Product combobox.

Me.LengthLabel.Caption = Me.Product.Column(3)

I get a null error when I attempt to do this. I'm sure I'm missing something pretty simple, as I'm very new to Access!

Thanks so much!!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 07:14
Joined
May 7, 2009
Messages
19,169
column of combobox is zero (o) based, meaning column #1, in code it is Column(0), etc.
 

Users who are viewing this thread

Top Bottom