Solved

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

Posted on 2015-02-10
2
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 50

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

735 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