Lesson 3: Form and Subform Design, part 1

Try This: Do the following steps
1. Open the Brown Bag Lunch database you have been working on. Or, you may download BBL Int ver3.accdb.
2. Create a new Query using the Create Queries->Query Design command. Use tbleProducts as the record source.
3. Add the following fields to the QBE Grid: ProductID, Item, Type, Specialty
4. Save the Query as ProductSearchSQ. Run the Query to test it, then close the Query.
5. Under All Access Objects->Queries, select the Product SearchSQ Query .

Go to Create->Forms->More Forms->Datasheet
6. Format the Datasheet with Alternate Row colors. Use a light color of your choice.
7. Apply Conditional Formatting to the Specialty column as follows:
Vegetarian has green text
Gluten Free has orange text
Low-Fat has pink text
8. Save the Form as ProductSearchSubform and close the form.
9. Create a new Table. Add the following Field and Data Types:
ProductSearchID, Autonumber (Also make this the Primary Key)
Type, Text
Specialty, Text
10. Save the Table as tblProductSearch. Close the Table
11. Create a new Form using the command Create->Forms->Form Design.
12. Using the Property Sheet, select the record source: tblProductSearch
13. Add a Header to the Form. Edit the Label to say: Search Products
14. Add a Combo Box to the detail section of the Form. Get the values from the Table tblType.

Select both available Fields.
15. Uncheck the option to hide the Key column. Set the Field Type to be stored in the Type Field. Finish the Wizard.
16. Using the Property Sheet, rename the Combo Box as TypeCombobox. Set the column widths as 0”, 1”
17. Save the Form as Product Search
18. Save and close the database.

 

Practice Activities