cannot get updated values from textbox or label

J

jameeesy

hi,

in access vba i have an onload sub (in a subform) that load values out
of a database and into the labels of a the subform. then if the user
clicks, say, a label, its value changes.

onload:
labelX.Caption = "valueXYZ"

onClick:
labelX.Caption = "valueXXYYZZ"

now when i run a function to retrieve this new label caption
("valueXXYYZZ") it actually retrieves "valueXYZ"

function (in module):
declare database & recordset & variable
variable = subformABC.labelX.Caption

but looking at "variable" it is actually still "valueXYZ" not
"valueXXYYZZ".

why won't it retrieve the updated label caption??
 
J

james.elks

actually figured it out all on my own.

function (in module):
declare database & recordset & variableX

variableX = Form_FormName.SubFormName.Form.LabelName.Value

yay!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top