Question - Record Selection

  • Thread starter Steve B via AccessMonster.com
  • Start date
S

Steve B via AccessMonster.com

In the application that I am developing there are records stored. In some
cases a revision or change needs to be done to that record. In this case I
want to keep a permanent copy of the old record as well as create a new one
with
all of the old existing information as a starting point. None of this is a
problem and I can do it (it is done through vba). How it works is you are on
a record and then you
click a button on a subform which runs the vba to create the new record.

Here is my problem.

At this point I want the newly created record to show up, but I can not
figure it out for the life of me. This is the code I am trying to use (AFEID
is the primary key and txtAFEID is an unbound text field on the subform that
is updated with the new ID):

Set rs = Me.Parent.Recordset.Clone
rs.FindFirst "[AFEID] = '" & Me![txtAFEID] & "'"
If Not rs.EOF Then Me.Parent.Bookmark = rs.Bookmark
Set rs = Nothing

As a final point I know that the record is being created because if I close
down the form and reopen it I can then go to the record via the above code.

Any help would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top