Next Post

Record Source

The purpose of the Record Source property is to set the source of the data for the report.

You can set the Record Source property to a table name, a query name, or you can build your own SQL statement by invoking the Query Builder. You can invoke Query Builder by clicking on the button with the three dots to the right of the Record Source property.

undefined

A pop up window with the title of ‘Show Table’ will appear. Under the ‘Tables’ tab, select the table or tables that contain data you would like to see on your report. In the example below, Suppliers has been selected. Click the Add Button which is located at the upper right of the screen.

undefined

Once all of the tables have been added, click the Close Button. The ‘Query Builder’ screen should appear and look very similar to the screen shot below.

undefined

Using this screen, you can now begin to build your SQL statement that will be used to populate your report. In this example, we've chosen to select all fields from the Suppliers table, but only those records where the SupplierID is less than 10. (Note: The Field Suppliers.* tells Access to select all fields in the Suppliers Table.)

When you click on the X button on the top right of the window, the following message will appear:

undefined

When this message box appears, click the Yes button.

undefined

When you return to the Properties window for the Report object, you will see the SQL details in the Record Source field.

Caption Property >


By Admin at 12 Apr 2016, 18:17 PM

Comments

 

Post a comment

Please correct the following: