Results 1 to 2 of 2
  1. #1
    LanieB is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    54

    Using A Checkbox For A Text Field

    Hello Ladies and Gents!



    I'm not sure if this is possible. I don't want to use a Yes/No field in the table. I would prefer to use a text field, so it can filter the 'answer' into another table.
    My question is, is there anyway to use a checkbox in a form, but you define what the Check and Uncheck enter into a table? Aka. If it's checked, it places a yes in the table and if unchecked it places a No in the table. I tried to use yes/no fields but that wouldn't filter right with my form and subform.

    Please let me know your thoughts!
    Thank you!

    Lanie

  2. #2
    Rawb is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Yes, but you'll need to use custom VBA coding to accomplish it.


    1. Create an Unbound checkbox with the appropriate default values, etc.
    2. Then edit its After Update Event with an If statement similar to the following:

    Code:
      If Me!MyCheckbox = True Then
        Me!FieldToChange = "My new Value if True"
      Else
        Me!FieldToChange = "My new Value if False"
      End If

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

Similar Threads

  1. Replies: 27
    Last Post: 01-21-2013, 02:43 PM
  2. Checkbox output to text in table record?
    By coronatus in forum Forms
    Replies: 6
    Last Post: 10-27-2012, 08:56 AM
  3. Display Text Only if Checkbox is Checked
    By Rick5150 in forum Forms
    Replies: 2
    Last Post: 09-16-2012, 09:19 AM
  4. Text box width/bring to front and Checkbox
    By SorenIX in forum Programming
    Replies: 16
    Last Post: 06-22-2011, 06:07 PM
  5. Checkbox controlling text box
    By chuckduarte in forum Forms
    Replies: 0
    Last Post: 10-21-2008, 10:45 AM

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