Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    173

    Unanswered: running a query from a button

    I'm using the following code to run an update query from the click of a button on a form:

    Dim stDocName As String

    stDocName = "qryporidwithnullvaluesupdate"
    DoCmd.OpenQuery stDocName, acNormal, acEdit

    Is there a way of the query running behind the scenes with out it first prompting with the statement that it's going to change records?

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: running a query from a button

    Originally posted by leeroy
    I'm using the following code to run an update query from the click of a button on a form:

    Dim stDocName As String

    stDocName = "qryporidwithnullvaluesupdate"
    DoCmd.OpenQuery stDocName, acNormal, acEdit

    Is there a way of the query running behind the scenes with out it first prompting with the statement that it's going to change records?
    sure
    put DoCmd.SetWarnings False
    before your code and it will not display warnings
    Jim

Posting Permissions

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