danomaniac
Programmer
I'm building a shipping report in access. I have in the detail section several bound text boxes. I'm trying to turn on an invisible warning label if the on hand quantity (OHQ) is less than the desired pull quantity (PQ) for that day.
Here's the setup:
In the detail section are textboxes txtPQ and txtOHQ which are bound to the underlying query which works fine.
Here's the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ohq As Integer
Dim pq As Integer
pq = txtPQ
ohq = txtOHQ
If pq > ohq Then
lblwarning.visible = True
End If
End Sub
Here's the problem:
If the pq > ohq condition is true for any record on the report, then the lblwarning.visible property is set to true for ALL the records on the report, not just the record where the condition is true. Any ideas?
Thanks for any help,
Dan
"It's more like it is now, than it ever has been."
Here's the setup:
In the detail section are textboxes txtPQ and txtOHQ which are bound to the underlying query which works fine.
Here's the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ohq As Integer
Dim pq As Integer
pq = txtPQ
ohq = txtOHQ
If pq > ohq Then
lblwarning.visible = True
End If
End Sub
Here's the problem:
If the pq > ohq condition is true for any record on the report, then the lblwarning.visible property is set to true for ALL the records on the report, not just the record where the condition is true. Any ideas?
Thanks for any help,
Dan
"It's more like it is now, than it ever has been."