Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Location
    Earth | North America | United States | California | Long Beach
    Posts
    62

    Unanswered: Query Last Run Information

    I have a problem that probably has an easy answer but it certainly eludes me at the moment...

    I have a form that pulls a date and time field from a table. This date and time are generated when a certain query has been run. The date and time on the form lets the user know (on the form) of the date and time that a particular Make Table query has been run. There is also a button on this form that will run the update query if, based on the date on the form, the user would like a more current dataset.

    My problem is that when the form is showing the date and time, the Update button cannot update the fields because it says that the table is open by another user.

    I tried to CLOSE the form within the Update macro but I still get the error message. However, if I run the macro (not within the form) I do not have this problem.

    Can someone help me in correcting this situation ... or if you have ideas for a better implementation that would also be greatly appreciated.

    Many thanks,
    Jack

  2. #2
    Join Date
    Jul 2003
    Location
    Frankfurt, Germany
    Posts
    20

    Re: Query Last Run Information

    hi

    you could detach the form from the data source while it is open by

    set me.recordset = nothing
    then you run the query
    then you reattach the form by

    rs.open "tablename",....
    set me.recordset = rs

    or even more simple by
    me.recordsource = "tablename"
    me.requery

    to detach the form you may have to set the focus to a non data bound control (lika a button) or, what always looks great too:
    use a register and hide the data page, show a page with a progress bar instead and a text like "your query is being processed, please wait..."
    or something like that

    hope i got the question right and these ideas will help you

    regards

    ron

Posting Permissions

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