M
mattc66 via AccessMonster.com
Hi All,
I want to lookup data in a query based on the CustomerID. When the user
enters a CustomerID in the form I want to use a DCount to go to the query
find the CustomerID that matches and if the Field OnHold = "H". From that I
am going to show a label on the Form that says "Account On Hold".
SID = Me.CustomerID.Value
stLink = "[CustomerID]=" & "'" & SID & "'"
If DCount("CustomerID", "qryARInvoiceSum", stLink, "Hold1") = "H" Then
Me.lblOnHold.Visible = True
End If
Obviously it doesn't work. Can anyone help on my syntax?
I want to lookup data in a query based on the CustomerID. When the user
enters a CustomerID in the form I want to use a DCount to go to the query
find the CustomerID that matches and if the Field OnHold = "H". From that I
am going to show a label on the Form that says "Account On Hold".
SID = Me.CustomerID.Value
stLink = "[CustomerID]=" & "'" & SID & "'"
If DCount("CustomerID", "qryARInvoiceSum", stLink, "Hold1") = "H" Then
Me.lblOnHold.Visible = True
End If
Obviously it doesn't work. Can anyone help on my syntax?