Tuesday, March 13, 2012

Creating a Parameter Query

Create a query using the Design View.

In query Design view, drag the fields from the field list to the query design grid.

In the Criteria cell for each field you want to use as a parameter, type an expression with a prompt enclosed in square brackets. To prompt the user for one or more characters to search for, and then find records that begin with or contain the characters the user specifies, create a parameter query that uses the LIKE operator and the wildcard symbol (*).


For example, the following statement searches for words that begin with a specified letter:

LIKE [Enter the first character to search by: ] & "*"
 
 

Result:

The following  statement searches for words that contain the specified character:
LIKE "*" & [Enter any character to search by: ] & "*"
 
 
 
 
 
 
 
 
 
Results:
 

Adding a Button to a form

Buttons can be used to control database functions in this case we will create a button to open a query. Open a database that has a query in it then;

  1. Create a form (use the “create” tab then select the form wizard).
  2. Once the form is created, ensure you are in design view then click the design tab.



    Click the Button tool. Click on the form where you want the button to appear.
    The window shown below will appear. Select “Miscellaneous” and “Run Query” as shown. Click next.
    Select the appropriate query (you have to have made a query before hand). Click next.
    Select either a text of picture button (what ever is more appropriate)


    Label the button by selecting the text option. Click next.

     

    Name the button command then click finish.
    1. While still in design view create labels for your form using the Aa tool.
    2. You can colour the background by simply right clicking on it and choosing Fill/Back Colour.
    3. Resize and position the queries as required then click save to have them permanently appear in that position each time the button is clicked.

    Finished Form with Buttons

    Wednesday, February 29, 2012

    Adding Digital Files to a Database

    Digital files such as image and sound files can be inserted into a database.

    Collect digital sound and image files of each of your friends in your Address database.

    Open the table that contains the address details.

    Go into design view.

    Add two new fields called voice message and photo.

    Set the data types for each to OLE Object.

    Go back into form view.

    In a cell under the new field simply right click and select insert object.

    Select the Create from file option and then browse to the location of your sound or image file.

    To view or listen to your files you will need to create a new form that contains the voice message and photo fields.

    The photo field contains an image of the person and the sound field contains a sample of music. By following the step above i have been able to successfully add a photo and music into a form.

      Bits and Bytes:

      http://computer.howstuffworks.com/bytes.htm/printable

      You will find there is a lot of information on the site. To help you identify what you need to know, search the site for the keywords  and questions listed below


      Digit: Any of the numerals from 0 to 9, esp. when forming part of a number

      Base 10:
      Well known decimal number system, represent any value with digit 0-9.

      Where does the word bit originate from?

      Comes from the word Binary digIT

      Examine the tables beow:

      Base10:
      Place Value
      10 000
      1 000
      100
      10
      1
      Place Value
      104
      103
      102
      101
      100
      Digit
      9
      0
      3
      0
      2
      Digit Value
      90 000
      0
      300
      0
      2
      90 302 (base 10) = (9 x 10000) + (3 x 100) + (2 x 1)

      If  6,357 can be written as;(6 * 1000) + (3 * 100) + (5 * 10) + (7 * 1) = 6000 + 300 + 50 + 7

      How would you write 4,321(4 * 1000) + (3 * 100) + ( 2 * 10) + (1 * 1) = 4000 + 300 + 20 + 1

      Examine the table below:

      Base2
      Place Value
      16
      8
      4
      2
      1
      Place Value
      24
      23
      22
      21
      20
      Digit
      1
      0
      1
      0
      0
      Digit Value
      16
      0
      4
      0
      0
      10100 (base 2) = (1 x 16) + (1 x 4) = 20 (base 10)
      Write the following numbers in binary (base 2)
       21
      10101= (1 x 16) + (1 x 4) + (1 x 1)
      24
      11100= (1 x 16) + (1 x8)
      30
      11110= (1 x 16) + (1 x 8) + (1 x 4) + (1 x 2)
      What is a byte?
      A group of binary digits or bits (usually eight) operated on as a unit

      How many bytes in a kilo, mega, giga and tera bytes?
      1 kilobyte = 1024 bytes
      1 megabyte = 1 048 576 bytes
      1 gigabyte = 1 073 741 824 bytes
      1 terabyte = 1 099 511 627 776 bytes



      Tuesday, February 28, 2012

      Creating A Form:








      This is an example of a form. A form is a record on the details of a person. Forms also make information easier to read and organise. 

      Monday, February 20, 2012

      Data Types

      1.    Create a new database in Access. Call it “Data types”.
      2.    Search for the phrase “field data types available in access” on Google. You should be able to obtain information on 9 data types used in access
      3.    Create a record for each of the data types – you will need four fields, namely “Data Type”, “Typical Use”, “Size” and “Example”.
      4.    Enter the data in the database.
      5.    Post about the data types you have investigated.
      

      Wednesday, February 15, 2012

      Querying A Database

      Yesterday we created queries for a database. We asked different queries to find out different information about the same products.

      Query 1:
      Product name of compaines in the USA

      Results for Query 1:


      Query 2:
      Product name and Price over $20


      Results for Query 2: 
      
      

      Query 3:
      Procduct name and the amoun of stock then have is over 30

      Results for Query 3: