I am trying to open a form in MS Access (Office 365). I am using the following VBA code:
DoCmd.OpenForm "CommunityAccountList", acNormal, , , , , "Community = " & Me.CommunityID.Value
The code was working fine, and then it started producing the error:
Run-time error '3070': The Microsoft database engine does not recognize '5239' as a valid field name or expression.
I preceded this line of code with 'MsgBox "Community = " & Me.CommunityID.Value' which produced the following popup: "Community = 1". I cannot figure out where Access is getting the 5239 from. Any help would be appreciated.
DoCmd.OpenForm "CommunityAccountList", acNormal, , "Community = " & Me.CommunityID.Value, as suggested by @June7. - Foxfire And Burns And Burns