Mr Lowe's Lessons...
Showtime Database Instructions - Handling Data
Modifying the Bookings Form with a Combo Box
This next stage adds a "Combo" box to the booking form
to look up the customer who is renting a video.
A combo box is a drop down list of options that you can choose
from
HOW TO DO IT
- Open up your database from My Documents if you haven't already
done so
- Go in to Forms and open up the "frmbookings" form
in design view
- Make the window bigger so that you can see all the available
parts of the form
- Select the customer number lable and press delete then
select the customer number control and press delete.
- Then click once on the "combo box" button on
the tool box (if the tool box is not visible it is easy to locate it)
- Then click on your form where you want to combo box to
go. You can move it later if you wish.
- In the next window select that you wish to look up a value
in a table or query. Then click Next
- In the next window choose the table "tblcustomers"
and then click Next
- Click on the > button to move the Customer Number field,
the First Name and the Surmame Name fields to the right hand part of the screen
which is the selected fields list. Then Click Next
- Choose to sort the order ascending by surname in the next
window then click Next
- Then un-tick the "hide key column" box in the
next window and click Next
- In the next window select Customer Number as a value to
store and then click Next
- Select "store this value in this field" option
and choose the "customer number" field in tblbookings table before
you click Next
- Label the combo box "Select a Customer" and then
click Finish
- You can then click on the "save" icon on the top
tool bar. Put your form in to "view" mode and see if it works...
You should be able to choose a customer from this drop down combo box
You can now do a similar thing to set up a combo box to look
up the values in the "Video Reference Number" field
You can also delete any fields that you do not want to see
on this form (i.e. any that are repeated)
This is the last step in setting up the Bookings Form
You can now enter all the booking details for customers who
have rented videos using this bookings form...
BACK TO MAIN PAGE