MS Access just stopped recognizing it's own text box exists
An MS Access form that has been working for over a year now, does a simple:
"Dim MyQuoteID as INTEGER
MyQuoteID = Me.QuoteID"
(It then proceeds to execute an SQL Statement inserting "MyQuoteID" that it just captured from the form)
...Only now it errors and says "Method or data member not found" on "Me.QuoteID".
Of course, the "QuoteID" box is right there, plainly vi开发者_如何学运维sible, and has been for over a year.
Obviously some kind of corruption because I didn't change anything - but it doesn't solve with a compact and repair!
WTH??????
Two things to try:
- Decompile via the command line (
msaccess.exe "path\to\your.mdb" /decompile
) - Use the undocumented
SaveAsText
andLoadFromText
methods to "export" and "import" your formSaveAsText acForm, "YourFormName", "YourFormName.txt"
LoadFromText acForm, "YourFormName", "YourFormName.txt"
I think you meant to write TextBox rather than INT. Assuming that this code is in the VBA module for a form, you do not need to define any of the controls in this way, nor is it good practice to do so. Just delete these two lines, and it might fix your problem.
精彩评论