hi guy....i need more hlp.
I have a form (ranking) with a combo winecode. when i selected a wine the subform(rankingsubform) is populated from a query.
Also i have a table with 2 fields (ponumber, qty).
the subform has two fields (winestatus, ponumber).
what i would like to do is to fill the winestatus automatically when the qty =0
Here is the code:
The problem is that if i have more than 1 record with the same ponumber it works for the first record in the subform only.
any clue?
thx, max.
I have a form (ranking) with a combo winecode. when i selected a wine the subform(rankingsubform) is populated from a query.
Also i have a table with 2 fields (ponumber, qty).
the subform has two fields (winestatus, ponumber).
what i would like to do is to fill the winestatus automatically when the qty =0
Here is the code:
Code:
If 0 = DLookup("qty", "tempwinestatus", "ponumber=" & Me.ponumber & "") Then
Me.winestatus = "Completed"
Else
Me.winestatus = " "
End If
Me.Requery
The problem is that if i have more than 1 record with the same ponumber it works for the first record in the subform only.
any clue?
thx, max.