cannot get updated values from textbox or label

  • Thread starter Thread starter jameeesy
  • Start date Start date
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??
 
actually figured it out all on my own.

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

variableX = Form_FormName.SubFormName.Form.LabelName.Value

yay!
 
Back
Top