How can I substitue a field name with a memvar below?
m_tempa = "H1" ' I store the value in a memvar
rs.Fields(m_tempa).VALUE ' I get an error when I try this.
Should be the same as
rs.Fields("H1".VALUE
Below is some of the actual code:
mCtr = 1
Do While mCtr <= 10 ' Get all 10 salry entries
If mCtr = 10 Then
m_junk = 0
Else
m_junk = mCtr
End If
m_temph = "H" & Str(m_junk)
m_tempr = "R" & Str(m_junk)
m_tempg = "G" & Str(m_junk)
m_tempa = "A" & Str(m_junk)
m_tempw = "W" & Str(m_junk)
If rsPRTCards.Fields(m_tempa).VALUE > 0 Then
' Do process...
End If
Loop
Thanks in advance,
STeve