Stumped on this – appreciate some help.
I have a text box (txtPartSaleSum) in the footer of a form with a control =Sum(IIf([Partsale]="Yes",1,0))
which simply sums the occurrences of the text value “Yes” in field PartSale on the form.
I also have a label, (PartBaltxt2) also in the footer of the same form, which I wish to make visible if the sum value in the text box is >= 1.
I just cannot get this sum value across to some simple code that would fire the label visible = true process.
Code:
Dim LPST2 As Long
LPST2 = Me.txtPartSaleSum
MsgBox "LPST2 Yes = " & LPST2
If LPST2 >= 1 Then
Me.PartBaltxt2.Visible = True
End If
(I can see the value of the sum in the text box but I cannot see a value other than 0 in the MsgBox debug aid).
Don’t know whether I should be trying to execute this in On Current, On Open, On Load or where else - having tried many of the events unsuccessfully.
Thanks in advance