atb.SqlSelect [ = strSelect]
Returns/sets the SELECT clause (without the keyword SELECT) of the SQL-String that determines the contents of the atb.
atb.SqlFrom [ = strFrom]
Returns/sets the FROM clause (without the keyword FROM) of the SQL-String that determines the contents of the atb.
atb.SqlWhere [ = strWhere]
Returns/sets the WHERE clause (without the keyword WHERE) of the SQL-String that determines the contents of the atb.
atb.SqlOrderBy [= strOrderBy]
Returns/sets the ORDER-BY clause (without the keyword ORDER BY) of the SQL-String that determines the contents of the atb.
Property RecordSource As String
atb.RecordSource [ = strRecordSource]
Returns/sets the SQL string that determines the contents of the atb.
atb.Filter [ = strFilter }
Returns or sets a filter expression, that limits the recordset
atb.OrderBy [ = strOrderBy]
Returns or sets a filter expression, that limits the recordset
RecordSource is the traditional interface used to specify the recordset. As an alternative (and better) the Sql.. properties may be used. Calling the method Refresh with the parameter WithRecordSource sets the property Recordset according to the Sql... properties or the property RecordSource, respectively.
The different properties influence each other like listed below:
These rules together may be viewed as followed:
Filter, OrderBy and the Sql... properties are supporting Universal Quotes. If the names of your tables or fields are containing special characters, you have to surround the name with quotes. Unfortunately every provider uses its own characters for quoting (e.g. Jet uses `, SQL Server and Oracle use "). You may use chr(1) and chr(2) as leading and trailing Universal Quotes respectively. The atb control translates these Universal Quotes into the proper quotes for your provider. Translation is done on writing the property, if you are reading the property, you will get the translated quotes. The connection of the atb control has to be open when translation is performed.
Example:
atb1.SqlFrom = chr(1) & strMyTable & chr(2)
Property RecordSource As String
cbo.RecordSource [ = strRecordSource]
Returns/sets the SQL string that determines the contents of the cbo control.