Results 1 to 5 of 5
  1. #1
    Cookie is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    45

    Checkbox with associated YES/NO texbox unable to Paste Yes or No into another textbox

    This is part of my Animal Welfare Database being developed in Microsoft Access Office 365.



    The segment I am working on is the Animal Welfare section where the attendant makes decisions about the welfare of a rescue cat and records these decisions by ticking checkboxes [] associated with a ]YES/NO[ field set next to labels, and a couple of small comment text fields (not shown here).

    e.g. Neuter Required [] ]NO[ 'the brackets are for illustration only here, for checkbox and small associated text field'

    When a checkbox is ticked, the associated textbox shows YES. (or you can type YES into the associated textbox, which ticks the Checkbox)
    If you click on the checkbox's associated textbox, you can see the -1 or, if unticked 0, for YES and NO respectively. (Type in anything else and you will get an information box saying that's not a valid input. Click OK and clear the error.)

    So, using another button to Post the result shown in the checkbox's associated textbox (i.e. Yes) to the WelfarePlan text field I used (extract only shown)

    "Neuter Required: " & Me.NeuterRequired

    this then results in

    Neuter Required: -1

    being reported in the targeted WelfarePlan textbox.

    What I want to do is have this item shown as

    Neuter Required: Yes


    Can you help me with this please?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    just drag a checkbox to the form, then bind it to the underlying field via recordsource property.
    or

    instead of checkboxes, set the format textbox property to:
    yes/no,
    or
    true/ffalse ,
    Or
    -1/0.

  3. #3
    Cookie is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    45
    Thank you ranman256.

    I already have:

    For the Checkbox: Properties Sheet - Data - Control Source - NeuterRequired
    For the associated text box which will show YES/NO or -1/0 if you click in it: Properties Sheet - Format - Yes/No - and Data - NeuterRequired

    Basically, the result that is I am expecting YES or NO to be appended in the WelfarePlan field (a separate field on the same form) rather than the corresponding -1 or 0.

    me.NeuterRequired is being seen as a number (i.e. 0, -1) instead of YES/NO.

    Here is what the WelfarePlan text box displays; you can see the 0, -1 values at the end of the lines. They should be No or Yes.

    15-Sep-20 8:23:45 PM Welfare Plan Review for: Zee
    COMMUNITY
    Neuter Required: -1
    Microchip Implant Required: 0
    INTESTINAL & SKIN
    Weight Management Required: 0
    Stabilisation of Stools Required (Waltham Range 2.0-3.0): 0
    Urinary Tract Infection Management Required: 0
    Flea Control Treatment Required: 0
    Worm Control Treatment Required: 0
    Last edited by Cookie; 09-15-2020 at 04:26 AM. Reason: Add some displayed text in WelfarePlan text box.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Use a combo box to remove any possible error. It will display as yes/no.

  5. #5
    Cookie is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Sep 2020
    Posts
    45
    Thank you ranman256.

    I found this works:

    Format(Me.NeuterRequired, "YES/NO")
    Last edited by Cookie; 09-15-2020 at 05:17 AM. Reason: Fix grammar.

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

Similar Threads

  1. Replies: 3
    Last Post: 07-23-2019, 01:45 PM
  2. Replies: 1
    Last Post: 07-08-2014, 02:06 PM
  3. Replies: 1
    Last Post: 11-17-2010, 10:38 AM
  4. Checkbox unable to display a tick
    By sabre1 in forum Access
    Replies: 0
    Last Post: 11-08-2010, 09:43 AM
  5. Checkbox unable to tick on a report
    By sabre1 in forum Reports
    Replies: 0
    Last Post: 11-08-2010, 09:38 AM

Tags for this Thread

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