I can't get this code to move to the next record. There are 32 label records, but rst!label_value is stuck on record 1's value for all 32 records? (I checked it with the msgbox)
What am I doing wrong?
Thanks,
Sup
Code:
Dim rst As Recordset
Dim sql as string
sql = "Select * from T_Labels where Code = '" & Me.cboProcedure & "'"
Set rst = CurrentDb.OpenRecordset(sql, dbOpenDynaset, dbSeeChanges)
'Show labels
If rst.RecordCount <> 0 Then
rst.MoveFirst
While Not rst.EOF
Me("lbl" & rst!Label_value).Visible = True
'msgbox rst!Label_value
rst.MoveNext
Wend
rst.Close
Set rst = Nothing
End If
What am I doing wrong?
Thanks,
Sup