Refresh Help

S

Stephen

I have a sizable DB that is a work in progress as I
constantly change it as time goes by. All is fine.

I have form ORDERS
a subform ORDERDETAILS
another subform of ORDERS called CURRENTINVENTORY

I have a field [QtyPcs] on Subform ORDERDETAILS
I want to Update/Refresh the data on
Forms ORDERS and CURRENTINVENTORY automatically whenever
a manual update to [QtyPcs] on Subform ORDERDETAILS
occurs and I want a message box to appear telling me if
I've used the last one.

I've accomplished that and it works.
HERE's THE QUESTION!!!!!!!!!!!!
HOWEVER...After I update the field and try to tab out of
it... the control remains in the field [QtyPcs] until I
TAB a second time.
The program does refresh both forms and I get the correct
message box to appear

I wrote the following procedure to the AfterUpdate in the
field [QtyPcs]


Private Sub QtyPcs_AfterUpdate()

Me![Quantity] = Me![QtyPcs] * Me![Weight]
Forms![Orders].Refresh
Me.Refresh

If Forms![Orders]![QtyAvailNow] = 0 Then
MsgBox "This is the Last " & Forms![Orders]!
[CurrentProduct] & " AVAILABLE You should check that
it is IN STOCK."

Else


If Forms![Orders]![QtyAvailNow] < 0 Then

MsgBox "There are now " & Forms![Orders]![QtyAvailNow]
& " " & Forms![Orders]![CurrentProduct] & " AVAILABLE -
Check that an Order has been placed."

End If
End If
End Sub

I know it has to do with these new Refresh commands, but
I'm stuck. Thanks in advance for you help

Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top