Question:

How can we run query in MS-Access? help me out please...?

by  |  earlier

0 LIKES UnLike

i don't know how to use MS-Access can anybody tell me hw do I make and run queries and create tables....... can anybody help me out plzzzzzzzzzz (it is about RDMS)

 Tags:

   Report

4 ANSWERS


  1. Go to the Queries tab, then create a new query. When it prompts you to add tables, close the dialog box and change the view to SQL View. Then you can enter any DDL or DML you like and execute it.


  2. These link have tutorials that may help you.

    Written by respectable lecturers in education institute.

    http://www.bcschools.net/staff/AccessHel...

    http://www.brainbell.com/tutorials/ms-of...

    http://databases.about.com/od/tutorials/...

  3. i do this all the time at work. Since you want to run a query , I'm assuming you already have table or form from which u will be pulling the data from. Simply click on "Query" under "Tables" and then click the design button. It will show you every category availble to put in your query, so drag what you need for your report onto the spreadsheet provided. Once you have every field at the very top there is a category called Query, click the red exclimation (sp) point to run it. It gets more complicated if you need to poll specific dates.

  4. Practice -

    Create a Table:

    --------------------

    1) When you begin a new project, you'll see a project window. In the objects menu of the project window, click 'Tables'.

    2) You can create tables using 3 methods: Design View, Using the Wizard, or by Entering Data. We're going to use Design View, so double click 'Create table in Design view'.

    3) We're going to create a simple table for employees. Here are the fields:

    ID (data type = autonumber)

    FirstName (data type = text)

    LastName (data type = text)

    Phone (data type = text)

    Fax (data type = text)

    Email (data type = text)

    You can set the properties for each field by clicking on the field you wish to edit the properties for, and then changing their properties at the bottom.

    4) Click on the 'Phone' field, and place the following in the Input Mask property:

    \(000") "000\-0000

    This tells Access that the phone number format should be (x*x) x*x-xxxx

    Repeat this for the field 'Fax'.

    5) Save your table as 'tblEmployee', when prompted to set a primary key select 'Yes'. This will set ID as your primary key.

    ------------------------------

    Running a Simple Query

    -----------------------------------

    1) In your project window, under 'Objects' click on 'Queries'.

    2) Again, you have 3 methods of creating queries, but we're going to use Design view. So, double click on 'Create query in Design view'.

    3) Close the Show Table box that pops up, we won't need it.

    4) On the top bar of the query window (where the title is) right click and select 'SQL View'.

    5) Remove the contents of the box, and paste in:

    SELECT ID, FirstName & " " & LastName As Name, Email FROM tblEmployee;

    6) Save your query as 'qryEmployee'.

    --------------------------------------...

    You can now view this query, but you'll need to input data on your table before the query can pull anything.

    Reading the query:

    Basically the query is saying: Select these fields: ID, FirstName, Last Name, and Email. But for the first name and last name...make it one row instead of 2 rows, and rename that row to Name. This will show as 'FirstName LastName'.

    Next we're telling it from which table to select these fields from.

    ------------------------------------

    I hope this brief tutorial has helped you to get started! Please, keep practicing and reading up on Access around the web. It's a powerful tool to utilize.

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions