Hi 1Family,
You should have Option Explicit at the top of every module immediately below the Option Compare Database
Option Compare Database
Option Explicit
This should then be used with regular compiling of your code after every change.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have been asked to handle Social Media for our university Center. I created an Access 2016 data base and everything seemed fine. However, now I keep getting an error message, and I have no idea how to fix it. The error message says "Compile error: Method or Data Member not found"
After that it says:
"Option Compare Database
Private Sub Text_Twitter_AfterUpdate()
Me.MemoFieldName.SelStart = 0
Me.MemoFieldName.SelLength = Len(Me.MemoFieldName)
DoCmd.RunCommand acCmdSpelling
End Sub"
Now the Database is broken. :(
First
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Hi 1Family,
You should have Option Explicit at the top of every module immediately below the Option Compare Database
Option Compare Database
Option Explicit
This should then be used with regular compiling of your code after every change.
It would appear that you don't have a control named Text_Twitter on your form. Maybe you changed the name or it has a space instead of an underscore.
I'm not so sure Scott; if it did not exist, how did its AfterUpdate event get invoked?
More likely MemoFieldName does not exist.
Could have been deleted.
Hi Scott and Tom. Thank you very much for your replies. I think I know what has happened, but I'm not exactly sure what I should do to fix it. I'm not really a newbie, because I began using Access over 20 years ago, but I haven't used it much in over a decade, and I have enjoyed getting back into it. Regarding this problem, I did something that in retrospect I should not have done, which is this.
After the database was basically finished and I had a set of tables, forms, and queries, I wanted to clean it up. I originally created unnecessarily complicated names. I changed the name of the Table from "T-Data_SM+RSCH-DB" to "T-Data_SMDB" (SMDB for "Social Media Database.") I changed the name of the form from "F-Data_SM+RSC" to "F-Data_SMDB". I thought that if one made changes to the names that the new names might automatically populate themselves as needed. I wasn't entirely clueless, because when I made the changes, I continued to test the database and everything seemed to work exactly as it should have. The problem didn't arise until I closed the database and reopened it. That was probably a week after making the changes and so that is why it didn't occur to me that that the name changes might be the source of the problem. I suspect that somewhere the database is looking for the old names and can't find them. If that is the source of the problem, I would like to enter the corrections where needed, but I'm not sure how to do so. I don't know any coding, so I hope it won't be too complicated to make the needed adjustments.
It seems that I may have created this problem, and if so, my apologies for having to ask for help to fix it.
All the best,
Bob