Avatar of SteveL13
SteveL13
Flag for United States of America

asked on 

Why having to press tab key twice?

I have the following code in an AfterUpdate event of a number field on a subform.  But after making an entry in the field I have to press the tab key twice to go to the next field as determined by the Tab Index.  Why would this be happening?  I really only want to tab one time.

Note: There is a field on the parent form that is being recalculated as the entry has been made in the subform field, hence the Me.Parent.Refresh code line.

    Me.txtProduct1StockAddedValue = Nz(DLookup("[StockAddedValue]", "tblProducts", "[ProductID] = 12"), 0) * Me.txtProduct1
    If IsNull(Me.txtProduct1) Then Me.txtProduct1StockAddedValue = 0
    Me.Parent.Refresh

Open in new window

Microsoft Access

Avatar of undefined
Last Comment
PatHartman

8/22/2022 - Mon