Results 1 to 3 of 3
  1. #1
    mp3909 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    154

    Saving query programmatically

    I am confused.



    When you programmatically open a query, rerun it and say you want to then close it, if you close it without specifying any parameter for the save option, then does the query close with the changes saved or not?

    Is it always best practice to specify a parameter for the save option?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    you normally open the query for the user to see it. When they have finished, let them close it.
    a button would be the only code needed to close the query: docmd.close

    data is saved automatically when the user moves off the record, or closes the query.
    if the user moves columns around, then the system will ask to save the changes, they can do it or refuse.
    I see no programmatic way to do it because it wont know the users preferences.

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    open a query, rerun it and say you want to then close it
    Simply opening makes no changes, so what changes are you asking about?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Changing and saving query under new name
    By PATRICKPBME in forum Queries
    Replies: 2
    Last Post: 01-16-2017, 09:40 PM
  2. Replies: 3
    Last Post: 04-22-2015, 04:35 AM
  3. How to change query criteria programmatically
    By fekrinejat in forum Programming
    Replies: 2
    Last Post: 02-04-2013, 05:07 PM
  4. Saving over a query
    By dssrun in forum Programming
    Replies: 2
    Last Post: 03-21-2011, 08:26 AM
  5. Export query without saving
    By prag in forum Queries
    Replies: 1
    Last Post: 11-18-2009, 06:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums