• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Copy record, close form displaying current record, reopen form to the new record

I am copying a current record to a new record via VBA code...

    Dim RS As DAO.Recordset
        Set RS = CurrentDb.OpenRecordset("tblMeterCertification")
        RS.AddNew
        RS!RecordDate = Date
	RS!blah, blah, blah
        RS.Update
        RS.Close
        Set RS = Nothing

Open in new window


But after the record has been copied I want the form to close and re-open displaying the new record.

How can I do this?
0
SteveL13
Asked:
SteveL13
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
maybe this is what you want.. no need to close and open the form

How to fill a record with data from a previous record automatically in Access
0
 
Gustav BrockCIOCommented:
You don't need to close and reopen the form.
Just use the Recordset behind to copy a record to a new and position the form:

http://www.experts-exchange.com/Database/MS_Access/Q_26621508.html#a34158936

/gustav
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now