S
Steve B
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 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. 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.
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 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. 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.