Solved

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

Posted on 2015-02-10
2
215 Views
Last Modified: 2016-02-10
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
Comment
Question by:SteveL13
2 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 250 total points
ID: 40600818
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
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 250 total points
ID: 40600946
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now