Data Member Not Found

thart21

Registered User.
Local time
Today, 04:58
Joined
Jun 18, 2002
Messages
236
I have a field "GPBuyerProjectID" in my query that my form is based on.

I have 5 other combo boxes just like this with different names, but, for some reason I am getting the message
"Compile Error" "Method or Data Member Not Found".

I have checked my queries, my field list, relationships and it all matches up. The field is in the field list for the query so I don't see how it can't find it.

When I go into VBA and type "Me." the list of available field names come up but "GPBuyerProjectID" s is not in it.

Does anyone know what might be causing this?


Private Sub GPBuyerName_BeforeUpdate(Cancel As Integer)
Me.GPBuyerProjectID = Me.ID
Me.GPBuyer = "GP Buyer"
End Sub

Thanks!
 
If this field was added to the query after the form was built, you'll need to force the form to refresh its fields collection. To do that, delete the query name from the recordSource property, move to another property so the change registers, and then past the name back. Save the form. It should now "see" all the columns of the controlSource.
 
Thank you so much Pat - that worked! I thought about doing that once but was afraid of losing all of my coding and having to redo it. I'm glad I now know that won't happen. :)
 

Users who are viewing this thread

Back
Top Bottom