Changing field names causing requery problem

sal

Registered User.
Local time
Today, 12:30
Joined
Oct 25, 2009
Messages
52
I thought is would be simple enough to change my primary field name [SurveyID] and replace the instance of the old field name in my code with the new one [FSID], but now I am getting Run-time error '438': Object doesn't support this property or method

Old code:

Private Sub Requery_Current_Record()
Dim lngRecNo As Long
lngRecNo = Me![SurveyID]
Me.Requery
Me![SurveyID].SetFocus
DoCmd.FindRecord lngRecNo, acEntire, , acSearchAll
End Sub

New Code:

Private Sub Requery_Current_Record()
Dim lngRecNo As Long
lngRecNo = Me![FSID]
Me.Requery
Me![FSID].SetFocus
DoCmd.FindRecord lngRecNo, acEntire, , acSearchAll
End Sub

I have looked for any instance where relationships, child fields, or code references may still refer to the old Field name but I do no see any.

Does anyone have a suggestion? Thank you.

Update: Control name on form slipped by. Renaming solved the problem.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom