Results 1 to 4 of 4
  1. #1
    RoyLittle0 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    25

    Clear text box on form load

    I have a form with a comments TextBox that when saved, updates the History text box, using the code in the history text box

    =ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([ID],0))

    What I need to do is clear the data in the comments textbox

    I have tried


    Me.Comments.Value = Null
    and
    Me.Comments.Text = ""

    But none seem to work.

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Is there a default value? Try this: Forms!yourformname!Comments = Null

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Try this

    Me.(elementname).value = ""
    Textboxes use .value as default

    labels use .caption as default

    Let us know if this works.

  4. #4
    RoyLittle0 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    25
    Thanks for the replies,

    I ended up using Me.Comments.Value = Null, but had to use the on click event, I couldn't get it to work on the form load event

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

Similar Threads

  1. Replies: 2
    Last Post: 03-12-2014, 01:31 AM
  2. Clear a form text box when user changes records
    By Artist.Anon in forum Forms
    Replies: 4
    Last Post: 08-19-2012, 07:53 PM
  3. clear form
    By slimjen in forum Forms
    Replies: 1
    Last Post: 05-16-2012, 02:53 PM
  4. How to clear the form?
    By Mrcams in forum Access
    Replies: 3
    Last Post: 01-03-2011, 12:15 AM
  5. Change the text box color on form load
    By mikec in forum Programming
    Replies: 2
    Last Post: 03-01-2010, 11:47 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