On a continuous form, how can I set focus on the record just added to the RecordSource recordset.
Here's the code that adds the record:
Code:
strSQL = "INSERT INTO PAYMENTLEDGER (LedID,RetYear,LedDate) VALUES ("
strSQL = strSQL & UserID & ",'" & gblRetreatYear & "',#" & DATE & "#);"
CurrentDb.Execute strSQL
Me.Requery
I could probably use DoCmd.FindRecord "LedID" if I knew the newly assigned autonumber'd LedID? Maybe use DMax to find the LedID, but all of that seems a bit convoluted so I thought I'd ask here for the simplest approach.
Thanks,
Bill