G
Guest
I have a table with 8 numeric (integer) fields plus one ID field. I’m trying
to set the value of 8 option groups to what is in the associated field using
the code below, but I get the following message:
Error No: 2465; Description: Microsoft Access can’t find the field “
referred to in your expression.
1. What am I doing wrong?
2. Is there a better way of looping through each field and passing its value
to the associate option group?
Dim i As Integer
Dim j As String
Dim aryArea As Variant
Dim fld1 As Fields
aryArea = Array("RM", "CO", "AR", "MA", "MO", "PU", "PS", "CC")
Me(j).Value = "opg" & aryArea(i)
For i = 0 To 7
Me(j).Value = DLookup(fld1(1 + i), "tblAreaTemp", "ScenarioID = " _
& g_intScenarioID)
If Me(j).Value > 0 Then
m_intCount = m_intCount + 1
End If
Next i
MsgBox "The count is " & m_intCount
to set the value of 8 option groups to what is in the associated field using
the code below, but I get the following message:
Error No: 2465; Description: Microsoft Access can’t find the field “
referred to in your expression.
1. What am I doing wrong?
2. Is there a better way of looping through each field and passing its value
to the associate option group?
Dim i As Integer
Dim j As String
Dim aryArea As Variant
Dim fld1 As Fields
aryArea = Array("RM", "CO", "AR", "MA", "MO", "PU", "PS", "CC")
Me(j).Value = "opg" & aryArea(i)
For i = 0 To 7
Me(j).Value = DLookup(fld1(1 + i), "tblAreaTemp", "ScenarioID = " _
& g_intScenarioID)
If Me(j).Value > 0 Then
m_intCount = m_intCount + 1
End If
Next i
MsgBox "The count is " & m_intCount