K
KRISH
Hi!
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim mystr(100) As String
Dim myint As Integer
Dim str1 As String
Dim ctr As Control
Set db = CurrentDb
Set rs = db.OpenRecordset("Select distinctrow
[Category] from [Payments];")
MsgBox str1
With rs
If Not (.EOF And .BOF) Then
.MoveFirst
myint = 1
Do While Not .EOF
mystr(myint) = ![Category]
str1 = str1 & "; " & mystr(myint)
.MoveNext
myint = myint + 1
Loop
End If
End With
MsgBox str1
str1 = ""
'MsgBox db
rs.Close
db.Close
In the above syntax rs (recordset) is fetching all records
in payments table. I need only unique records. Please help
what is wrong in it. Thanks for your help.
Krish
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim mystr(100) As String
Dim myint As Integer
Dim str1 As String
Dim ctr As Control
Set db = CurrentDb
Set rs = db.OpenRecordset("Select distinctrow
[Category] from [Payments];")
MsgBox str1
With rs
If Not (.EOF And .BOF) Then
.MoveFirst
myint = 1
Do While Not .EOF
mystr(myint) = ![Category]
str1 = str1 & "; " & mystr(myint)
.MoveNext
myint = myint + 1
Loop
End If
End With
MsgBox str1
str1 = ""
'MsgBox db
rs.Close
db.Close
In the above syntax rs (recordset) is fetching all records
in payments table. I need only unique records. Please help
what is wrong in it. Thanks for your help.
Krish