Results 1 to 3 of 3
  1. #1
    phd4212 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    4

    Form Command Button: Add Record, Close Form and Open Report

    Is this possible? I'm getting hung up on the code

    Thanks

  2. #2
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    Im guessing you mean you want to SAVE your record. Pass the record to the report and then close the form ?

    DoCmd.GoToRecord , , acSave
    Dim stDocName As String
    stDocName = "YourReportNameHere"
    DoCmd.OpenReport stDocName, acNormal
    docmd.close

    Lemme know if thats what u mean (seems to easy though )

  3. #3
    phd4212 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    4
    I just had a typo in my report name. It was that simple. I feel like an idiot. Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-10-2012, 09:32 AM
  2. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  3. Replies: 11
    Last Post: 01-26-2012, 01:22 PM
  4. Use a command button to open a form
    By johnpaul in forum Forms
    Replies: 24
    Last Post: 09-23-2010, 12:29 PM
  5. Replies: 3
    Last Post: 01-14-2010, 08:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums