Results 1 to 4 of 4
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,191

    Output as yes/no NOT true/false

    Hi Guy's is there a way i can change how a recordset will out put from the "paid" field ? the output results in true/false, can this be changed to Yes/No, the field is set to Yes/No also the format is set to Yes/No

    Click image for larger version. 

Name:	Capture.JPG 
Views:	14 
Size:	16.9 KB 
ID:	40418

    Code:
    Set rs = CurrentDb.OpenRecordset("Select tblInvoices.InvoiceDate, tblInvoices.InvoiceNumber, tblInvoices.Customer, " _ 
    & "tblInvoices.Qty, tblInvoices.Ref, tblInvoices.Description, tblInvoices.Total, tblInvoices.Paid, tblInvoices.PaidDate " _
                                    & "FROM tblInvoices " _
                                    & "WHERE InvoiceDate Between #" & StartDate & "# And #" & EndDate & "#")


  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Output to where? If not exporting data, why does this matter?

    Can convert the value to a string. One way: Format([Paid], "Yes/No") AS PaidInv
    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.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    You can do this in the table design.
    Select the field then on the General tab, make sure you format as Yes/No and ensure the display control is set to textbox on the Lookup tab.

    Having said that, its often easier to visualise if you set the display control to checkbox
    However they are displayed, the values are still stored as 0 & -1
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Colin, OP said table field is set for Yes/No.

    I tested this and in spite of table setting, recordset field outputs True/False, not Yes/No. A query object will carry forward Yes/No but recordset does not.
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-16-2015, 08:41 AM
  2. Replies: 8
    Last Post: 10-06-2014, 03:02 PM
  3. True And False
    By azhar2006 in forum Forms
    Replies: 4
    Last Post: 12-23-2013, 03:50 AM
  4. Yes/No True/False
    By DSTR3 in forum Access
    Replies: 5
    Last Post: 12-04-2010, 05:56 PM
  5. True or false
    By tleec in forum Queries
    Replies: 1
    Last Post: 02-01-2008, 10:41 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