none
True or False on an unbound form RRS feed

  • Question

  • I am assuming that a True/False from a query cant be used as a string? Can someone suggest me how to go about this

    Any help please......Bob

    Dim strSQL As String 
           strSQL = "SELECT qHorseNameSourceModify.NoInvoiceNumber FROM qHorseNameSourceModify"
        Me!ckbNoInvNumber.RowSource = strSQL

        

    xxx

    Wednesday, December 2, 2015 1:54 AM

Answers

  • This code does not compile, does it? Checkboxes don't have a rowsource.

    Guessing at what you are trying to do, maybe you can use DLookup to get a value from a field in a row in a table or query, and use the value returned to check or uncheck the checkbox.


    -Tom. Microsoft Access MVP

    • Marked as answer by TurnipOrange Wednesday, December 2, 2015 9:30 PM
    Wednesday, December 2, 2015 1:59 AM

All replies

  • This code does not compile, does it? Checkboxes don't have a rowsource.

    Guessing at what you are trying to do, maybe you can use DLookup to get a value from a field in a row in a table or query, and use the value returned to check or uncheck the checkbox.


    -Tom. Microsoft Access MVP

    • Marked as answer by TurnipOrange Wednesday, December 2, 2015 9:30 PM
    Wednesday, December 2, 2015 1:59 AM
  • Thanks Tom for the advice much appreciated .....Bob

      ckbNoInvNumber.value = DLookup("NoInvoiceNumber", "qHorseNameSourceModify")


    xxx

    Wednesday, December 2, 2015 9:30 PM