Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

runtime error 1004

Discussion in 'Information Technology' started by Kate, Jul 28, 2006.

Tags:
  1. Kate

    Kate
    Expand Collapse
    Guest

    Hi, i have an access form with a button that you press that does a
    whole pile of stuff, and ends by opening excel and running a macro. It
    is saved to a shared drive. It runs fine from my computer, but when
    some of the others run it, they get half way through the macro in excel
    then get "runtime error 1004".

    Does anyone know why that happens?

    Thanks
     
  2. Loading...


  3. Kate

    Kate
    Expand Collapse
    Guest

    Perhaps I should be more specific...

    When talking about runtime errors, other people talk about spliting the
    database into front end and back end. I am a bit confused about this
    and have several questions...

    1) Is this the only way to get about such errors and preventing
    corrupting the database?

    2) If I do this, would I leave hte 'back end' on our server with only
    me having access to it, and put hte front end on each computer that
    uses it?

    3) Every time I change the design (ie add queries, new reports, change
    formulas etc) would I have to redistribute the front end to all users?

    4) Would people with the front end be able to assign the same primary
    key to a record (obviously tht would be no good)? How does it work?
    At what point does the information they enter get back to the table in
    the back end? When they open their front end, can they sort through all
    the info other people have entered by getting the data directly from
    the table in the back end?

    5) Can I set this up now, even though there are several entries in the
    database?

    Thanks!
    Kate
     
  4. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On 6 Jun 2006 20:34:24 -0700, "Kate" <ktm19@student.canterbury.ac.nz>
    wrote:

    >Perhaps I should be more specific...
    >
    >When talking about runtime errors, other people talk about spliting the
    >database into front end and back end. I am a bit confused about this
    >and have several questions...
    >
    >1) Is this the only way to get about such errors and preventing
    >corrupting the database?


    Perhaps not the only way, but it's a very reliable and very easy way.

    >2) If I do this, would I leave hte 'back end' on our server with only
    >me having access to it, and put hte front end on each computer that
    >uses it?


    Yes.

    >3) Every time I change the design (ie add queries, new reports, change
    >formulas etc) would I have to redistribute the front end to all users?


    Yes. This can be automated - see Tony Toews' website
    http://www.granite.ab.ca/access/autofe.htm for a good way to do so.

    >4) Would people with the front end be able to assign the same primary
    >key to a record (obviously tht would be no good)? How does it work?
    >At what point does the information they enter get back to the table in
    >the back end? When they open their front end, can they sort through all
    >the info other people have entered by getting the data directly from
    >the table in the back end?


    All the users are sharing exactly the same table, in the shared
    backend database. The individual frontend databases don't contain ANY
    data - just links to the tables in the backend. When one user updates
    a table, every other user is a) briefly locked out of that record so
    you can't have two users updating the same record in conflicting ways
    and b) will see the new record as soon as it's entered.

    >5) Can I set this up now, even though there are several entries in the
    >database?


    Yes.

    John W. Vinson[MVP]
    >Thanks!
    >Kate
     
  5. Kate

    Kate
    Expand Collapse
    Guest

    Thankyou, very helpful!

    Does the back end have just tables, or everything including queries,
    forms and reports, and macros?

    And then does hte front end have everything except tables?
     
  6. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On 6 Jun 2006 21:20:59 -0700, "Kate" <ktm19@student.canterbury.ac.nz>
    wrote:

    >Thankyou, very helpful!
    >
    >Does the back end have just tables, or everything including queries,
    >forms and reports, and macros?


    Just tables.

    >And then does hte front end have everything except tables?


    Everything else, and the tables linked.

    Tools... Database Utilities... Database Splitter Wizard will do this
    for you quite neatly.

    Everyone does need full Windows read/write/create/delete permissions
    on the server folder containing the backend (so Access can create and
    delete the .ldb "locking" file).


    John W. Vinson[MVP]
     
  7. Kate

    Kate
    Expand Collapse
    Guest

    If the back end only has the tables, in which version of hte front end
    do I change the design of the forms or queries such that all users get
    the update?
     
  8. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Any version you want. As John mentioned, you're going to have to
    redistribute the front-end to all your users once the change has been made.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Kate" <ktm19@student.canterbury.ac.nz> wrote in message
    news:1149670895.308975.101150@i39g2000cwa.googlegroups.com...
    > If the back end only has the tables, in which version of hte front end
    > do I change the design of the forms or queries such that all users get
    > the update?
    >
     
  9. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On 7 Jun 2006 02:01:35 -0700, "Kate" <ktm19@student.canterbury.ac.nz>
    wrote:

    >If the back end only has the tables, in which version of hte front end
    >do I change the design of the forms or queries such that all users get
    >the update?


    What I'll usually do is keep my own copy of the .mdb frontend (and
    also a "test" copy of the backend so I can edit data without
    disrupting data in the production database). When I have a new form or
    report or query, I'll relink it to the production backend and convert
    it to a .MDE file to conceal and protect the code and make it more
    efficient; the .MDE file will then get distributed to the users.

    John W. Vinson[MVP]
     
  10. Kate

    Kate
    Expand Collapse
    Guest

    Right-o, I hope I don't stuff this up!

    One of the buttons on the form runs a select query, and copies the
    information from teh select query to an excel spreadsheet. Then it
    runs a macro which is stored in another spreadsheet to copy the info
    from the first spreadsheet over and reformat it. THe first spreadsheet
    gets written over each time hte button on the form is clicked, but the
    second spreadsheet is read-only. My question is, where should I store
    the excel files containing those macros? Should they be on the server,
    or should I distribute one version to each user? (The runtime error
    that this post was originally about was caused when trying to run this
    macro from excel).

    Thanks!
     

Share This Page