M
Max Moor
Hi All,
I have a subform (continuous forms) with a number of records in it.
Each record includes a "SortOrder" field used, as you might guess, to sort
the records. When a new record is added, I want to assign (Maximum Current
SortOrder + 1) to the SortOrder of the new record.
I added AfterInsert event code, thinking I'd do a DMax call on the
form's recordset to get the current Max value, but I'm not specifying the
recordset in the call correctly. I have:
DMax("[SortOrder]", "Forms!frmMain!fsub_Subform.Form.Recordset")
(Note that "fsub_Subform" is the name of the subform control on the main
form)
Can someone straighten me out?
Thanks, Max
I have a subform (continuous forms) with a number of records in it.
Each record includes a "SortOrder" field used, as you might guess, to sort
the records. When a new record is added, I want to assign (Maximum Current
SortOrder + 1) to the SortOrder of the new record.
I added AfterInsert event code, thinking I'd do a DMax call on the
form's recordset to get the current Max value, but I'm not specifying the
recordset in the call correctly. I have:
DMax("[SortOrder]", "Forms!frmMain!fsub_Subform.Form.Recordset")
(Note that "fsub_Subform" is the name of the subform control on the main
form)
Can someone straighten me out?
Thanks, Max