Results 1 to 4 of 4
  1. #1
    dayavathi is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jul 2015
    Posts
    1

    [code]about queries[/code]

    1) what condition must be satisfied if you want to retrieve data from two tables by using the query wizard?


    2) why is design view needed when you create queries easily by using a wizard?
    3 ) what are the different methods of running a query?
    4 ) can you create a query that displays all the fields of table? if yes, how?
    5) how can you crate queries that are based on existing queries?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    1. no condition. unless you want one in it. you cant add multiple table in the wizard, you can in query designer.
    2. you dont. you can use the wizard anytime. but you dont have to use the wizard.
    3. there is only 1 method to run a query (in design mode). click the run button. (tho in VB, you can use Docmd.openquery)
    4. in query design, dbl-click the star *. this will pull all fields. or you can select all fields and drag them down into the query, or just type: select * from table.
    5. start a query, drag the query into the design, or select QUERIES from the wizard (instead of tables)

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    I hope the teacher gives ranman a good grade.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    3 ) what are the different methods of running a query?
    There are different types of queries. One way to look at queries in Access is to place a query into one of two categories, an Action query or a Select query. An action query will do something like Append or Update. A select query will retrieve records and might also include aggregate calculations.

    So you would not really run a query that retrieves records. You would run a query that performs an action like appending records to a table. You can run a query using VBA code or you can double click a saved query object from within the Navigation Pane or you can use the Run (Exclamation Icon) button from within Design View.

    Here are two simplified examples of using VBA to run or execute an action query. Here, the actual SQL statement is being used. However, you can also execute a query object by using the name of the object in place of an SQL statement.
    Code:
    DoCmd.RunSQL "INSERT INTO Table2 ( MyField ) SELECT Table1.MyField FROM Table1;"
    'or
    CurrentDb.Execute "INSERT INTO Table2 ( MyField ) SELECT Table1.MyField FROM Table1;"

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

Similar Threads

  1. Replies: 2
    Last Post: 10-01-2014, 06:28 AM
  2. Replies: 1
    Last Post: 10-15-2013, 10:41 AM
  3. Help me understand queries in my code
    By Datech in forum Queries
    Replies: 0
    Last Post: 06-15-2012, 08:32 PM
  4. Replies: 2
    Last Post: 05-03-2012, 08:03 AM
  5. Replies: 3
    Last Post: 01-02-2011, 07:17 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