I might not have phrased the question correctly in the Subject of this
post. Please read the entire explanation.
I have a form with a command button (Add New Person). This button opens
up another form (frmPeople) with a NewRecord (blank fields). The
frmPeople form has a command button to save the record. I call this
scenario ADD Mode. When the record is saved we stay in ADD Mode and get
another NewRecord.
This form (frmPeople) may, also, be entered by selecting a person's name
from a combobox. This opens up frmPeople with the entire recordset
available and positioned at the selected person. I call this BROWSE
Mode. All fields are protected until the user hits the EDIT command
button.
I want to change this a bit. After the NewRecord is saved, instead of
staying in ADD Mode, I want to go into BROWSE Mode and have all records
available. I want to be positioned at the newly saved record.
I thought that I could use the Requery method on the form (me.Requery)
to pull in all records based on the RecordSource already defined in the
form's attributes. That doesn't seem to work, because when I code the
following after the Requery ...
'Position current record to the record just saved
Set db = CurrentDb
Set rs = Me.RecordsetClone
rs.FindFirst "[peopleID] = " & lngPID
Me.Bookmark = rs.Bookmark
it fails on the "me.bookmark = rs.bookmark" instruction with "No current
record" error.
Does anyone have any suggestions?
- SueB
Regards,
SueB
*** Sent via Developersdex http://www.developersdex.com ***