L
LisaB
I have an Access 2000 front-end connected to a SQL 2000 backend
I have a form with a subform
when a new record is created in the subform I would like to use the value in
the autonumber field to run some code
-- for example
After the user enters a value in fldGrantNum I would like to execute
the expression me.fldGrantID = "ABC" + AutoNum
THE PROBLEM
The autonumber is not generated until the record is saved/updated in SQL
When I try to force a save by using
--- DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
I get the runtime error 2046
---- The Command or Action 'SaveRecord' isn't available now
How do I force a record to be saved so that the autonumber field will
generate a new number
I have a form with a subform
when a new record is created in the subform I would like to use the value in
the autonumber field to run some code
-- for example
After the user enters a value in fldGrantNum I would like to execute
the expression me.fldGrantID = "ABC" + AutoNum
THE PROBLEM
The autonumber is not generated until the record is saved/updated in SQL
When I try to force a save by using
--- DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
I get the runtime error 2046
---- The Command or Action 'SaveRecord' isn't available now
How do I force a record to be saved so that the autonumber field will
generate a new number