+ Reply to Thread
Results 1 to 4 of 4

How to make the Checkboxes write to records as 0 and 1 and not true false

  1. #1
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    How to make the Checkboxes write to records as 0 and 1 and not true false

    Ok guys,

    I need a few more small touches to complete my project.

    My excel sheet has to be perfect for my parser to accept the data, so that is why these small things are so important.

    My Worksheet has a correct incorrect column using 1 and 0 's
    I need a 1 and 0 in each row.

    When I submit a new record I can do the following and it shows my TRUE record as a 1 but all my FALSE 0 records as blanks.

    The problem here is that my False rows are blank and not ZEROS
    I use the - after the = and before the value

    .Cells(iaRow, 2).Value = -Me.CBTrvAns1.Value
    .Cells(iaRow + 1, 2).Value = -Me.CBTrvAns2.Value
    .Cells(iaRow + 2, 2).Value = -Me.CBTrvAns3.Value
    .Cells(iaRow + 3, 2).Value = -Me.CBTrvAns4.Value


    Now when I do an update statement it looks like the following

    CBTrvAns1.Value = r2Find.Offset(4, 2).Value
    CBTrvAns2.Value = r2Find.Offset(5, 2).Value
    CBTrvAns3.Value = r2Find.Offset(6, 2).Value
    CBTrvAns4.Value = r2Find.Offset(7, 2).Value

    I have tried to but the - and the *1 but I cant get it to return anything but TRUE and FALSE to my worksheet


    Any help would be greatly appreciated.

    below is my code

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Perhaps.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: How to make the Checkboxes write to records as 0 and 1 and not true false

    Norie,

    Thanks that worked for that section what about on


    CBTrvAns1.Value = r2Find.Offset(4, 2).Value

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    What's the problem there?

    Do you want the value of the checkbox to be determined by the value in the cell?

    I would have thought that code would work, especially if the cell value was 0 or 1.

    If it doesn't perhaps you could do something similar to the code I posted earlier.
    Please Login or Register  to view this content.
    Or perhaps something simpler.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Make 0 into a negative and NOT false or true
    By Slender in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-09-2013, 02:28 PM
  2. [SOLVED] How to make textbox visible true/false
    By fremarco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2012, 11:40 PM
  3. make OR() return 0 or 1 instead of true and false
    By boarders paradise in forum Excel General
    Replies: 16
    Last Post: 10-19-2009, 01:06 PM
  4. Creating True or false checkboxes
    By L_ter in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-19-2009, 12:04 AM
  5. [SOLVED] Macro to make all checkboxes false and clear all comboxes
    By ynissel in forum Excel General
    Replies: 5
    Last Post: 07-29-2005, 08:05 PM

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