Results 1 to 4 of 4
  1. #1
    tommyried is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    38

    code for clear button is not working

    Hello everyone ,



    Please can anyone help me in the attached database,I want to clear the fields thru command button called clear iam getting an error in vba ?
    Attached Files Attached Files

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Do not try to assign a value to your control that holds the expression. Assign null to the two will suffice.


    Me.Text22 = Null
    Me.Text24 = Null

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Why are there two bound textboxes each for discount and grossmargin? Why do you want to clear data from the record? Why do you need a calculate button? The expression will calculate automatically.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    tommyried is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    38
    thanks everyone

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

Similar Threads

  1. Button to clear a record, not working
    By snipe in forum Forms
    Replies: 3
    Last Post: 02-17-2014, 02:23 PM
  2. clear fields button not working
    By fainterm in forum Forms
    Replies: 20
    Last Post: 02-04-2014, 01:13 PM
  3. Replies: 2
    Last Post: 08-03-2013, 03:41 PM
  4. Replies: 3
    Last Post: 05-16-2012, 10:20 AM
  5. Command button code to clear form
    By windwardmi in forum Forms
    Replies: 15
    Last Post: 11-21-2010, 03:21 PM

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