M
March
Hello All,
I would like to write VBA code to hide any duplicated data. I start the code
with query the data from table.
For example:
sqlcmd = "<query>"
set xAccountRST = db.openrecordset(sqlcmd)
xAccountRST.movelast
n = xAccountRST.recordcount
xAccountRST.movefirst
For i = 1 to n
Combo1.HideDuplicates = True
Combo1.RowSourceType = "Value List"
Combo1.AddItem Item:=xAccount
xAccountRST.MoveNext
Next n
From code above, in the query I use "Distinct". The result of add item
listed the combo box has the duplicated data.
Please give me suggestion.
Thank you ,
March
I would like to write VBA code to hide any duplicated data. I start the code
with query the data from table.
For example:
sqlcmd = "<query>"
set xAccountRST = db.openrecordset(sqlcmd)
xAccountRST.movelast
n = xAccountRST.recordcount
xAccountRST.movefirst
For i = 1 to n
Combo1.HideDuplicates = True
Combo1.RowSourceType = "Value List"
Combo1.AddItem Item:=xAccount
xAccountRST.MoveNext
Next n
From code above, in the query I use "Distinct". The result of add item
listed the combo box has the duplicated data.
Please give me suggestion.
Thank you ,
March