I assume that the line
clearfields
was intended to be part of the comment 'reinit the textboxes. If not, what is it? A Function? If it's intended to be part of the comment, and it actually appears in your code like does above, without an apostrophe preceding it, that could be the thing Access is hiccuping on. The Access Gnomes are not known for accuracy when highlighting the actual line of code that causes an error.
Obviously the Access Gnomes should be able to 'find' Enabled, the Method, so you have to lok at Joe's question, can the Data Member, txtmerid, be found? Is it actually on the Form whose Code Module holds this code? Is it spelled correctly?
If the answer to all of the above questions is 'yes,' you need to consider that the Textbox has become corrupted. Controls can and do become corrupted. The test and the fix is one and the same; delete the Control then re-create it.
If none of this works, comment out the line
txtmerid.Enabled = True
delete the following line, which is identical, as Joe said, and see if the line
txtprd.Enabled = False
errors out.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007