Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    rasto is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6

    Question how to find out the specific function of a query?

    so I have an access 2016 database where i need to change a few things but i do not know how to find out what some of the queries do. I figured that they are append queries but i don't know what do they append... the same goes for select and make-table queries.
    pls help

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  3. #3
    rasto is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    it is an .idb file from a friend who needs to change names of some tables/queries/reports/forms but since that seems to be very difficult i want to just create new tables/queries/reports/forms but i don't know how to figure out what do the queries do...

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I think you meant its an accdb file

    In the navigation pane there is an option to sort by type. Click it.
    Now go to queries. All queries of same type will be together starting with Append queries then other types in alphabetical order.
    Each type has a different icon e g append queries have a + sign, delete queries have a red x etc.

    HTH
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Have you opened them in Design or SQL view?

    The Table and Related Views option for the Navigation Pane might offer clue where some SELECT queries are used.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    No. The ldb is a lock file for Access 97----2003.
    The file you want to use is the .mdb

    But I recommend you make backups because you seem to be a "neophyte" with Access.

    Sorry, after starting this I was interrupted for about 3hrs and just posted it.
    Others have answered since my original.
    Last edited by orange; 03-17-2018 at 02:14 PM. Reason: lapse between typing aand posting

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Hi orange
    OP is using Access 2016. He/she actually wrote idb not ldb
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  9. #9
    rasto is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    i know about this but how do i find out what does the query append? like what change it does in a table?

  10. #10
    rasto is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    i have a database regarding product sales of a certain company. now some of the regular buyers have changed. in the database, there are queries that specifically for these customers and i need to replace them but to do that i need to know what these queries do so i can set the new queries in a similar way and change only things like name and destination table. the important thing is: how do i figure out what these queries append in which tables/rows/ fields etc...

  11. #11
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I know about this.
    What exactly is this that you do know about?

    Open each query in design view and study each field. In the design ribbon, click append and note the table name. That is where the records will be appended.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  12. #12
    rasto is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    well that is the thing, when i double-click the query access tells me it is an append query that will modify table and asks me if i want to run it...if i do run it another window pops up asking me if i want to append 7 rows (doesn't state in which table or which rows or anything) if i do run it nothing new shows up, no window opens, just nothing...Click image for larger version. 

Name:	Bez názvu.png 
Views:	11 
Size:	155.0 KB 
ID:	33150Click image for larger version. 

Name:	Bez názvu1.png 
Views:	11 
Size:	104.6 KB 
ID:	33151

  13. #13
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    rasto,

    You really haven't answered ridders question
    What exactly is this that you do know about?
    Show us the underlying SQL of the query ---copy and paste.
    It would be helpful if told us step by step what you do to get to these messages.

  14. #14
    rasto is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2018
    Posts
    6
    Code:
    Option Compare Database
    
    Private Sub Příkaz1_Click()
    On Error GoTo Err_Příkaz1_Click
    
    
        DoCmd.Quit
    
    Exit_Příkaz1_Click:
        Exit Sub
    
    Err_Příkaz1_Click:
        MsgBox Err.Description
        Resume Exit_Příkaz1_Click
        
    End Sub
    Private Sub Příkaz2_Click()
    On Error GoTo Err_Příkaz2_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "frm_Vyber odberatela na objednavku"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Příkaz2_Click:
        Exit Sub
    
    Err_Příkaz2_Click:
        MsgBox Err.Description
        Resume Exit_Příkaz2_Click
        
    End Sub
    Private Sub Príkaz5_Click()
    On Error GoTo Err_Príkaz5_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "Datum pre denny suhrn objednavok"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Príkaz5_Click:
        Exit Sub
    
    Err_Príkaz5_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz5_Click
        
    End Sub
    Private Sub Príkaz6_Click()
    On Error GoTo Err_Príkaz6_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "frm_Vyber odberatela na kartu zakaznika"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Príkaz6_Click:
        Exit Sub
    
    Err_Príkaz6_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz6_Click
        
    End Sub
    Private Sub Príkaz7_Click()
    On Error GoTo Err_Príkaz7_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "Datum pre dodaci list"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Príkaz7_Click:
        Exit Sub
    
    Err_Príkaz7_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz7_Click
        
    End Sub
    Private Sub Príkaz8_Click()
    On Error GoTo Err_Príkaz8_Click
    
        Dim stDocName As String
    
        stDocName = ChrW(84) & ChrW(108) & ChrW(97) & ChrW(269) & ChrW(32) & ChrW(101) & ChrW(116) & ChrW(105) & ChrW(107) & ChrW(105) & ChrW(101) & ChrW(116)
        DoCmd.OpenReport stDocName, acNormal
    
    Exit_Príkaz8_Click:
        Exit Sub
    
    Err_Príkaz8_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz8_Click
        
    End Sub
    Private Sub Príkaz9_Click()
    On Error GoTo Err_Príkaz9_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = ChrW(68) & ChrW(97) & ChrW(116) & ChrW(117) & ChrW(109) & ChrW(32) & ChrW(112) & ChrW(114) & ChrW(101) & ChrW(32) & ChrW(116) & ChrW(108) & ChrW(97) & ChrW(269) & ChrW(32) & ChrW(101) & ChrW(116) & ChrW(105) & ChrW(107) & ChrW(105) & ChrW(101) & ChrW(116)
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Príkaz9_Click:
        Exit Sub
    
    Err_Príkaz9_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz9_Click
        
    End Sub
    Private Sub Príkaz10_Click()
    On Error GoTo Err_Príkaz10_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "Datum OD_DO"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Príkaz10_Click:
        Exit Sub
    
    Err_Príkaz10_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz10_Click
        
    End Sub
    Private Sub Príkaz11_Click()
    On Error GoTo Err_Príkaz11_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = ChrW(102) & ChrW(114) & ChrW(109) & ChrW(95) & ChrW(72) & ChrW(108) & ChrW(97) & ChrW(118) & ChrW(110) & ChrW(225) & ChrW(32) & ChrW(100) & ChrW(97) & ChrW(116) & ChrW(97) & ChrW(98) & ChrW(225) & ChrW(122) & ChrW(97) & ChrW(32) & ChrW(118) & ChrW(353) & ChrW(101) & ChrW(116) & ChrW(107) & ChrW(253) & ChrW(99) & ChrW(104) & ChrW(32) & ChrW(111) & ChrW(98) & ChrW(106) & ChrW(101) & ChrW(100) & ChrW(110) & ChrW(225) & ChrW(118) & ChrW(111) & ChrW(107)
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Príkaz11_Click:
        Exit Sub
    
    Err_Príkaz11_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz11_Click
        
    End Sub
    Private Sub Príkaz12_Click()
    On Error GoTo Err_Príkaz12_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "frm_Editacia objednavok"
        DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
    
    Exit_Príkaz12_Click:
        Exit Sub
    
    Err_Príkaz12_Click:
        MsgBox Err.Description
        Resume Exit_Príkaz12_Click
        
    End Sub
    is this it? im sorry i dont really know...
    and the messages - after i double click the append query in the navigation pane i get a first message (2nd picture in my previous post) and then the other message (1st picture)

  15. #15
    Join Date
    Apr 2017
    Posts
    1,673
    What you posted are procedures in VBA module. The first procedure closes something. Most of procedures open various forms. One procedure (Príkaz8_Click) opens a report with name calculated as character string

    The only procedure starting some printout directly is likely
    Príkaz8_Click, so you have to find out whan name the report has, locate the report and open it for editing, and identify the query used as source for this report. After that you can locate the query and open it for editing.

    In case the report is started from one of forms activated from procedure, you have to open every one of them in edit mode, and find out, is there some control (button, combo box, etc) which activates some report, and read the report name from there.

    The simplest way is set a stop (left-click on pane at left of code) for 1st code row after declarations in every procedure, and then open your app and try to run your report. Whenever some procedure in module is run, the code is stopped at set stop, and from there on, you can continue with code stepwise, or run the code further until next stop or to end.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 44
    Last Post: 04-26-2017, 01:53 PM
  2. Replies: 7
    Last Post: 05-28-2015, 11:43 AM
  3. Replies: 8
    Last Post: 02-09-2014, 07:25 PM
  4. Use Function to find data from a Query
    By SaskiFX in forum Programming
    Replies: 7
    Last Post: 01-17-2014, 08:11 AM
  5. Replies: 8
    Last Post: 07-13-2012, 04:53 PM

Tags for this Thread

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