By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Runtime error 2185 bug?

P: 2
I have a sub form which contains amongst other things 4 textboxes and a disabled button.
My goal is that when all 4 text boxes are filled, the button enables, and if one text box is empty, it immediately disables. My method for doing this was as follows:
Expand|Select|Wrap|Line Numbers
  1. Private Sub c1_Change()
  2.     cmdNew.Enabled = Not (IsNull(c2.Value) Or IsNull(c3.Value) Or IsNull(c4.Value) Or c1.Text = "")
  3. End Sub
  4. <same for the other text boxes>
This code disables the button immediately when the text box is empty (when it has the focus, the text property would be "" and the value property wouldn't be updated yet) and enables it the second the text box has some text again.
Now, this works perfectly when I have the form open separately.
However, when I try editing the text boxes once I'm using the form as a sub form, runtime error 2185 appears.
I am forced to believe this is a bug of access, but if you can force me to believe otherwise, please do!
Nov 16 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 2,653
Hello, Taccat.

I could not reproduce your situation (Access 2003, Win XP SP3).
Could you attach a sanitized copy of your db to the thread?

Nov 16 '08 #2

P: 2
I think I might have found a cause of my problem. The sub form is a continuous form, and rather than adding new records by scrolling to the bottommost record, I came with the idea to fill in the data in the form footer.
Apparently, when there are no records to be shown and someone is trying to add data via the form footer, that error appears.
I discovered that setting 'Allow additions' to true makes the error disappear.
Nov 16 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.