Runtime error 2185 bug?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Taccat
    New Member
    • Nov 2008
    • 2

    Runtime error 2185 bug?

    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:
    Code:
    Private Sub c1_Change()
        cmdNew.Enabled = Not (IsNull(c2.Value) Or IsNull(c3.Value) Or IsNull(c4.Value) Or c1.Text = "")
    End Sub
    <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!
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    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?

    Regards,
    Fish

    Comment

    • Taccat
      New Member
      • Nov 2008
      • 2

      #3
      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.

      Comment

      Working...