VB specialists help wanted: Would this code work?

princess15s

Registered User.
Local time
Today, 20:44
Joined
Aug 2, 2001
Messages
15
Private Sub Trade_Date_AfterUpdate()
On Error GoTo Err_Trade_Date_AfterUpdate
Me.Refresh
DoCmd.RunQuery CalcualteNetPrice
DoCmd.RunQuery CalculateSettlementDate
Me.frmTrade(M).Requery

Exit_Trade_Date_AfterUpdate:
Exit Sub

Err_Trade_Date_AfterUpdate:
MsgBox Err.Description
Resume Exit_Trade_Date_AfterUpdate
End Sub
 
Would it work to do what? What does the "(M)" refer to in "frmTrade(M)"?
 
Would this code work? This is a code to requery the two queries Im using to calculate Net Amount and settlement Date. This code is supposed to execute every time I enter or change data. The frmTrade(M) is a file name..
 
Are you trying to update all the records in your tables each time a form item changes??? Or do you want to update a single field in a single row?

If you answer yes to the first question, then either you are updating some global field, or you have a design problem.

If you answer yes to the second question, there are much better ways to do this.
 

Users who are viewing this thread

Back
Top Bottom