I am working on an established database and I would like to add a new field to one of the main tables. I added the field, I saved the field, I verified that it is present, I verified the spelling. When I try to access the new field from my code I get:
Code:
Compile Error: Method or Data Member Not Found
What can I do?
EDIT: Also, just noticed that my 'Properties' box is empty in the VBA window when this error is raised, so no record source is visible. Did I somehow get to this function with the record source being unset?
Here are the relevant parts of my code:
Code:
Private Sub Form_Open(Cancel As Integer)
If Nz(Me.OpenArgs) = 0 Then
Me.RecordSource = "LOT_DATES"
DoCmd.RunCommand acCmdRecordsGoToNew
GoTo endMe
Else
' I'm passing open arguments, so this is my record source
Me.RecordSource = "Select LOT_DATES.* FROM LOT_DATES WHERE (((LOT_DATES.LOT_NUMBER)='" & Me.OpenArgs & "'));"
End If
.
.
.
endMe:
Call updateTally
and
Code:
Private Function updateTally()
Dim requiredTally
Dim completedTally
requiredTally = 0
completedTally = 0
.
.
.
If requiredTally = completedTally Then
Me.TST_COMP = Now()
Else
Me.TST_COMP = Null
End If
My new field is TST_COMP and that is what raises the error