?
Solved

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

Posted on 2015-02-10
2
Medium Priority
?
222 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 1000 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 52

Accepted Solution

by:
Gustav Brock earned 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

649 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