Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adapt Form (2000)

    I have a database that I am trying to insert a form that I got from this site and adapt it to my data. It was working fine and now I get errors. I am attaching the scaled down database that has just the form and the table that has the data. I am not sure why it was working and suddenly getting errors. Any help or answers would be greatly appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adapt Form (2000)

    The VBA in your database is corrupted beyond repair. You can retrieve the tables, queries and even the form, but all VBA code will be lost. It's best to go back to a non-corrupt backup if you have one.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adapt Form (2000)

    I went back to a copy of the database and copied in the form and all necessary objects. The form works fine until I select all. Then it freezes and shuts down the database. When I get back into the database then I can't open the form and I get the errors. My database has over 20,000 records. Could it be too many records for select all?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adapt Form (2000)

    Selecting 20,000 records at once is a bit much, but it shouldn't corrupt your database. But why do you want to select all records?

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adapt Form (2000)

    I copied the form verbatim and that is one of the command buttons to select all records. The form has a multi select list box and there is a command button to select all records.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adapt Form (2000)

    Although a list box with over 20,000 items is not a good idea (imagine a user scrolling through all those items), selecting all of them shouldn't be a problem.
    Selecting 20,000 records in a bound form could be problematic - Access will probably try to load all of them into memory.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adapt Form (2000)

    I removed the Select All command button and the form works. If you multi Select more than say 500, it freezes and shuts down the database but it doesn't corrupt the database. The form opens the next time the database is opened. I don't see any reason why someone would select more than 500 so the form should work for what I need it to do. Thanks for your help. I have attached (a stripped down version) the corrected database. You can multi select by using the shift key or the Ctrl key.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adapt Form (2000)

    The text box below the list box is constantly kept up to date. Each item in the text box takes up 7 characters (6 for the item, plus a comma as separator). Imagine, if 20,000 items are selected, the total length of the string in the text box would be 20,000*7 = 140,000 characters! No wonder something went wrong!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •