Results 1 to 6 of 6
  1. #1
    tuna is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    21

    Run Make Table query automatically

    Hi, is it possible to run a Make Table query automatically on opening another query (who takes values from the table created by the Make Table query)?



    Thanks

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Questions:
    1) What do you mean by Make Table Query.
    2) Do you want to create a table and then populate it with the values in a Query.
    3) Or You want to Create a Query that will Display will display all or some data in another Query.

    A little more details may be an explanation with example will be helpful.

    Both are possible.

  3. #3
    tuna is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    21
    Thanks. I think Access calls it a "Make Table" query but it's a SELECT ... INTO query - I just need this action query to run when another query loads since I will be using the newly created table (from the action query) in that query.

    Any ideas?

  4. #4
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Sure I have Ideas

    examine the following code:

    Private Sub Command0_Click()
    On Error GoTo Err_Command0_Click

    Dim strSQl As String

    strSQl = "Select MemberId,M_FirstName,M_LastName,State,City Into member_d From Member Where City='Kolkata'"
    CurrentDb.Execute strSQl


    Exit_Command0_Click:
    Exit Sub

    Err_Command0_Click:
    MsgBox Err.Description
    Resume Exit_Command0_Click

    End Sub

    Attached to a command button of a Form. This code Do the following:
    1) Create a New Table member_d
    2) Append all Data from Table Member Whose for which City Field is 'Kolkata'


    if this solves your problem mark the thread solved.

  5. #5
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    if your problem is solved mark the thread solved.

  6. #6
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    if your problem is solved mark the thread solved.

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

Similar Threads

  1. Problem With Make-Table Query
    By rwharris in forum Queries
    Replies: 1
    Last Post: 03-23-2010, 01:23 PM
  2. Make table query
    By Zahed in forum Queries
    Replies: 1
    Last Post: 11-06-2009, 05:44 AM
  3. Replies: 2
    Last Post: 10-27-2009, 07:09 AM
  4. Make Table Query Issue
    By tmcrouse in forum Access
    Replies: 0
    Last Post: 07-23-2009, 03:20 PM
  5. Make a table query
    By Fiona in forum Access
    Replies: 4
    Last Post: 06-25-2009, 11:24 AM

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