+ Reply to Thread
Results 1 to 3 of 3

Command Button To Save & Clear

Hybrid View

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

    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 Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Command Button To Save & Clear

    Mooseman

    Hard to say with the information maybe

    textbox1.value=""
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,912

    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
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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.6.0 RC 1