Solved

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

Posted on 2015-02-10
2
207 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 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 250 total points
Comment Utility
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
Comment Utility
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)

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

772 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