Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2004
    Posts
    361

    Unanswered: Exit Button Issue

    Does Anyone have the code to make an exit button just close a form instead of writing the data to the table which its bound too?

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Lookup "Rollback" in the Access help file.

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    QUOTE=tjarvas]Does Anyone have the code to make an exit button just close a form instead of writing the data to the table which its bound too?[/QUOTE]

    PHP Code:
      If you just want to close the form then 
        DoCmd
    .Close acForm Me.Name 
      End 
    If 

  4. #4
    Join Date
    Mar 2004
    Posts
    361
    Ok, well is it possible to write the exact code so I can just copy and paste it into the event procedure. The name of the form is Update Inventory. Sorry but I am VB handicaped.

    Thanks a bunch.

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Quote Originally Posted by tjarvas
    Ok, well is it possible to write the exact code so I can just copy and paste it into the event procedure. The name of the form is Update Inventory. Sorry but I am VB handicaped.

    Thanks a bunch.
    The Me.Name will return whatever your Form's name is
    Just copy and past the code

  6. #6
    Join Date
    Mar 2004
    Posts
    361
    It seems that when I try and paste

    IF
    DoCmd.Close acForm Me.Name
    End If

    the top of the VB screen changes to general instead of the name of the button I am modifying?

  7. #7
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    This code DoCmd.Close acForm Me.Name must be put in the on Click event of your command button for example Exit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •