The previous post explained how to:
- create a new module
- write a Function that creates a Pass-Through query that returns records from the QuickBooks® customer table
- create an SQL statement that places the query results into a Microsoft® Access table
- navigate to the database window to see the new table
Examine the New Table
Double-click the table to view the results if desired and then close.
With the new table highlighted, click Design from the menubar of the database window.
Design View lets you see all the fields in the customer table. The list is so long the screenshot does not contain all the fields. You will seldom need all the fields from any table. However, now you know how much more information QODBC provides than the QuickBooks® interface.
Create a Customer Form
You may now create a form that uses the new table as a record source.
- Select Forms from the Objects list of the database window.
- Click New from the menubar of the database window
- Select Form Wizard from the New Form window
- Select the new table from the drop-down list
Highlight the fields you wish to include on your form and click the arrow to move them to the Selected Fields column.
Include ListID because remember, ListID is the Unique Identifier. You will use each customer's ListID to link to other tables.
Select Tabular as the type of form to create.
Select the style you like.
Type a name for the new form and click OK.
Design Your New Customer Form
You now have a form filled with QuickBooks® customers. You may alter the appearance to suit your taste. For example, ListIDs are for reference only so you may wish to move them off the form or make them smaller.
To alter the form, select Design View from the View menu of the Microsoft® Access menubar. Design the form any way you like and save it.
Next you will create a button on the form that refreshes the customer table with a mouse click.
Do you like this post? Please link back to this article by copying one of the codes below.URL: HTML link code: BB (forum) link code: