Microsoft Access provides users with a small, lightweight database application that can be used in web or desktop software. Microsoft Access also allows users to run reports and monitor business finances using tables and stored procedures. All the information created in Access is stored in tables. An "insert" query is the main function that inserts a new record into these tables. Microsoft Access has a code console that allows you to create the insert queries.
Open Microsoft Access and click on the "Query" icon at the main menu. This displays a window that lists all your currently programmed queries in Microsoft Access.
Click the "New Query" button. The design view opens and a list of tables included in the database is displayed. Click the "Cancel" button. In the main menu, click the "SQL Code" view. This switches from the main design viewer to the code console, which is used to create insert queries in SQL.
Type the following insert query shell into the code window:
insert into <table>
(column1, column2, column3)
Replace "<table>" with the table name where the data is inserted. The second line is the table's columns. These columns represent the column names given when you designed the table. Finally, the last line represents the values. In this example, the values are surrounded in brackets. The brackets indicate to Microsoft Access that the user is prompted for the information.
Click the "Save" button at the top of the Access window. Enter a name for the new query in the prompt, and close the SQL Viewer. The main query window is displayed again, and the new query is now listed.
Double-click the new query to test it's function. Before inserting values, a prompt is displayed for you to enter the data. Enter it and press the "OK" button. The values you enter are inserted into the Access table.
- Photo Credit laptop with database record on 15.4" wide screen image by .shock from Fotolia.com
How to Create Access Queries
Microsoft Access queries are used to sort, organize and manipulate data in Access databases. Queries can be used to create reports, show...
How to Insert a Blank Column in an Access Query
Microsoft Access queries are useful in showing specific raw data records in a specific order or grouping. Editing is limited for a...
How to Insert a Column in Access Design View
Microsoft Office productivity suite ships with Microsoft Access, a versatile database application that provides easy-to-use Design and Datasheet views. Using the Datasheet...