Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. StrNewRecord = "SELECT * FROM Customers " _ The combo box is filled by an SQL statement that returns the customer ID (in the bound column) and the company name. The next example changes a form's record source to a single record in the Customers table, depending on the company name selected in the cmboCompanyName combo box control.
Forms!frmCustomers.RecordSource = "Customers" The following example sets a form's RecordSource property to the Customers table. For example, you can set a form's RecordSource property to an SQL statement that returns a single record and change the form's record source depending on criteria selected by the user. Limiting the number of records contained in a form's record source can enhance performance, especially when your application is running on a network.
For example, you could create a form that incorporates a standard design, and then copy the form and change the RecordSource property to display data from a different table, query, or SQL statement. The RecordSource property is also useful if you want to create a reusable form or report.
This is equivalent to creating a desktop shortcut like: '#Is there a ms access runtime hierarchy full version
How my code currently works, is that a user will double-click on the application.accdb file, which launches the full version of MS Access. If a form's Recordset property is set at runtime, the form's RecordSource property is updated.Īfter you have created a form or report, you can change its source of data by changing the RecordSource property. Working with MS Access and VBA has been my first venture so far. Changing the record source of an open form or report causes an automatic requery of the underlying data.