G
g
Hi,
I'm using access 2000. I'm not that super expert in using vb in access so
please help me out on my problem.
Here is my code, I'm trying to assign whatever the first 3 value(Field Name
"Number") I could find in a 3 variable from MR_SelectedCriteria Table.
Example: If the first 3 Number recordset find is 105,108,111 Then
Criteria1=105
Criteria2=108 and Criteria3=111. The value of number in table always change
as I have another function that will do that. I'm thinking of using recordset
but I don't know how to assign the value.
Dim strSql As String
Dim Num As Variant
Dim Criteria1 As Variant
Dim Criteria2 As Variant
Dim Criteria3 As Variant
strSql = "SELECT Number FROM MR_SelectedCriteria;"
Set rs = DBEngine(0)(0).OpenRecordset(strSql)
Do While Not rs.EOF
Num = rs.Fields("Number")
rs.MoveNext
' I think this is where I need to assign the value on Criteria(1 to 3)
Loop
rs.Close
Set rs = Nothing
I'm using access 2000. I'm not that super expert in using vb in access so
please help me out on my problem.
Here is my code, I'm trying to assign whatever the first 3 value(Field Name
"Number") I could find in a 3 variable from MR_SelectedCriteria Table.
Example: If the first 3 Number recordset find is 105,108,111 Then
Criteria1=105
Criteria2=108 and Criteria3=111. The value of number in table always change
as I have another function that will do that. I'm thinking of using recordset
but I don't know how to assign the value.
Dim strSql As String
Dim Num As Variant
Dim Criteria1 As Variant
Dim Criteria2 As Variant
Dim Criteria3 As Variant
strSql = "SELECT Number FROM MR_SelectedCriteria;"
Set rs = DBEngine(0)(0).OpenRecordset(strSql)
Do While Not rs.EOF
Num = rs.Fields("Number")
rs.MoveNext
' I think this is where I need to assign the value on Criteria(1 to 3)
Loop
rs.Close
Set rs = Nothing