'How to Loop through a specific column in a table [closed]

New to Access VBA and need some assistance. I have a table with a boolean field I am trying to loop through to locate all of the "False" fields. Once located I want to display a messagebox containing the ID number and some basic information. My table is housed in a SQL database. Thanks for the help!



Solution 1:[1]

You could use GetString. Here's an example

Public Sub MsgBoxActives()

    Dim rs As ADODB.Recordset
    Dim cn As ADODB.Connection

    Set cn = CurrentProject.Connection
    Set rs = cn.Execute("SELECT CUSTOMERID, DISCOUNT FROM [Volume Rebate Customers] WHERE not [INACTIVE?];")

    MsgBox rs.GetString

End Sub

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dick Kusleika