Problem with updating subform datasheet.

  • Thread starter Thread starter Frank Martin
  • Start date Start date
F

Frank Martin

I have a tblLastCost which is to store ProductID, LastCost, LastDate.

This is put onto our FrmCreditors via a subform FrmLastCostSUB.

The fields of FrmLastCostSUB are filled by a macro using the "SetValue"
property and this is triggered by the OnExit property of the relevant
FrmCreditors fields.

It works fine, but when the three fields of the FrmLastCost are entered the
pointer there refuses to go to a new record, with the result that the
existing fields are over-written.

How can I make the new data go to a new record automatically?

Please help, Frank
 
Frank,

Did you try the GoToRecord/New action in your macro?

By the way, just a comment on the use of SetValue actions to write a new
record, it may be more robust to use an Append Query to put the new
tblLastCost record in, and therefore use an OpenQuery action in your
macro to accomplish the task.
 
Back
Top