rupdated subform

adaniele

Registered User.
Local time
Tomorrow, 05:52
Joined
Jul 18, 2005
Messages
176
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:
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.
 
Solved

adaniele said:
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:
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.


SOLVED. thank you all
 

Users who are viewing this thread

Back
Top Bottom