+ Reply to Thread
Results 1 to 3 of 3

Thread: Command Button To Save & Clear

  1. #1
    Forum Contributor
    Join Date
    09-26-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    160

    Question Command Button To Save & Clear

    I have created a form with a subform in it. I have craeted a command button to save the data which works find but I also need it to clear the text boxes as well.

    Private Sub Command24_Click()
    On Error GoTo Err_Command24_Click
    
    
        DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    
    Exit_Command24_Click:
        Exit Sub
    
    Err_Command24_Click:
        MsgBox Err.Description
        Resume Exit_Command24_Click
        
    End Sub

  2. #2
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,150

    Re: Command Button To Save & Clear

    Mooseman

    Hard to say with the information maybe

    textbox1.value=""

  3. #3
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,155

    Re: Command Button To Save & Clear

    Is your form and subform bound to table(s). If they are, then you do not need to save as this happens automatically in Access. If you want to open a new record, then add a command button and use the wizard to open a new record which will have nothing in the input text boxes.

    Alan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0