After update event not work properly.

abzalali

Registered User.
Local time
Today, 20:21
Joined
Dec 12, 2012
Messages
118
Dear All,

When I enter number of Copies >= StoreID.column(2) then it return StoreID.column(2) value

And when I enter nuber of Copies < StoreID.column(2) then it return same.

Please help me.

Code:
Private Sub Copies_AfterUpdate()
    If Me.[StoreID].Column(2) >= Me.[Copies] Then
        MsgBox "Number of copies you enter is not available: " & Me.StoreID.Column(2), vbInformation, "Number of Copy in Store"
        Me.Copies.Value = Me.StoreID.Column(2)
        Me.Copies.SetFocus
    End If
End Sub

Thank in Advance
Mir
 
Mir,

Make sure that it is treating your values as numbers.

If CInt(Me.[StoreID].Column(2)) >= CInt(Me.[Copies]) Then ...

Wayne
 
Dear Wayne,
Now it's work properly.

Thank
Mir
 
Dear Wayne,

Could you help me for another one:

When I enter number of "copies" then it's after update event check this "If CInt(Me.[StoreID].Column(2)) >= CInt(Me.[Copies]) Then ..."fine, After that Number of "copies" value deduct with "[StoreID].Column(2)" if Transaction type 'Sales', it would be (-) from "[StoreID].Column(2)" and if Transaction type 'Purchase' it would be (+) with "[StoreID].Column(2)" for each line transaction Accordingly.

Help me please help me.

Thanks
Mir
 

Users who are viewing this thread

Back
Top Bottom