J
Jason
Hi all
Trying to add a button to a column header (The button will be transparent)
The intention, is to have a button for each column, so that when the user
clicks on the button, the sort order in the list will be sorted by the
column. Example... If the column is COUNTRY, then clicking the transparent
button will sort the list by country. If the column is PROPERTY, then the
transparent button will sort the list by property
I am using the following code, but when I click the button the values in the
list fly away into Access Heaven leaving the list empty
Dim strOrderBy As String
Const strcStub = "SELECT QRY_SEARCHENTITY.TXT_PROPERTYID,
QRY_SEARCHENTITY.TXT_PROPERTY, QRY_SEARCHENTITY.TXT_BRAND,
QRY_SEARCHENTITY.txt_COUNTRY, QRY_SEARCHENTITY.TXT_FACILITYID,
QRY_SEARCHENTITY.TXT_BUSINESSUNIT FROM QRY_SEARCHENTITY"
strOrderBy = "ORDER BY QRY_SEARCHENTITY.txt_COUNTRY"
Me.LST_SRCHENTITY.RowSource = strcStub & strOrderBy
Any suggestions on where I am going wrong?
Thanks in advance.
Trying to add a button to a column header (The button will be transparent)
The intention, is to have a button for each column, so that when the user
clicks on the button, the sort order in the list will be sorted by the
column. Example... If the column is COUNTRY, then clicking the transparent
button will sort the list by country. If the column is PROPERTY, then the
transparent button will sort the list by property
I am using the following code, but when I click the button the values in the
list fly away into Access Heaven leaving the list empty
Dim strOrderBy As String
Const strcStub = "SELECT QRY_SEARCHENTITY.TXT_PROPERTYID,
QRY_SEARCHENTITY.TXT_PROPERTY, QRY_SEARCHENTITY.TXT_BRAND,
QRY_SEARCHENTITY.txt_COUNTRY, QRY_SEARCHENTITY.TXT_FACILITYID,
QRY_SEARCHENTITY.TXT_BUSINESSUNIT FROM QRY_SEARCHENTITY"
strOrderBy = "ORDER BY QRY_SEARCHENTITY.txt_COUNTRY"
Me.LST_SRCHENTITY.RowSource = strcStub & strOrderBy
Any suggestions on where I am going wrong?
Thanks in advance.