recording error messages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill

    #1

    recording error messages

    I'm looking for a way to output the text that is displayed when a
    warning is displayed from running a query into a table or a text file.
    It's my intent to have a log of when a query was run and how many
    records that it updated as well as the number of records that were not
    updated. Right now I have all of my queries coded into a form that
    opens when the database opens and the warnings are turning off. I'm not
    really sure how to proceed from here.

  • Allen Browne

    #2
    Re: recording error messages

    If you are talking about recording the engine-level messages that are
    generated when you RunSQL or OpenQuery on an action query, that's not
    practical. They are not exposed.

    Instead, use the Execute method to run your action queries. This avoids the
    unnecessary messages, but you can still be notified about errors if the
    action did not run to completion. For details, see:
    Action queries: suppressing dialogs, while knowing results
    at:
    How to use the Execute method to run action queries in Microsoft Access, avoiding unnecessary confirmation dialogs while still being notified of any errors and knowing if the query completed successfully.


    I don't think you are talking about logging the VBA errors that occur in
    your code/event procedures, but if you want to log those, see:
    Error Handling in VBA
    at:
    How to trap and log the errors reported while a Microsoft Access database is in use. (Access 95 and onwards.)


    --
    Allen Browne - Microsoft MVP. Perth, Western Australia
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bill" <wlippinc130@gm ail.comwrote in message
    news:1169661841 .175797.261900@ a75g2000cwd.goo glegroups.com.. .
    I'm looking for a way to output the text that is displayed when a
    warning is displayed from running a query into a table or a text file.
    It's my intent to have a log of when a query was run and how many
    records that it updated as well as the number of records that were not
    updated. Right now I have all of my queries coded into a form that
    opens when the database opens and the warnings are turning off. I'm not
    really sure how to proceed from here.

    Comment

    Working...