Autobody shops search form

G

Guest

Hi –

I need a little bit of help with my search form.

What I’m attempting to do is create a form that will allow the end user to
search for auto body shops in the local area…

My form has 3 combo boxes in the Header (County, City, Shop) and the details
of the auto body shops (address, phone, fax, etc.) are text boxes in the
Details section.

To find an auto body shop closest to the user, they will click on the County
combo box and select a County, then choose a City within that County in the
City Combo Box, then, select an auto body shop within that City…

All of the above works for me….

What I cannot get to auto populate are the details of the auto body shops,
the address, the phone number, the fax number, etc…Again, these are all in
the Details section of this form and are all Text boxes…I put them in the
Details sections as I used the Solutions/Northwind db as a guide...

I’ve tried different AfterEvents and OnCurrent Events on the Shop combo box
(3rd box) to populate the address, etc., but have not been able to come up
with a winning formula…I know I need some 'event' after the shop combo box...

Any ideas???

Thanx in advance for the help!!!
 
A

Al Camp

Marc,
(use your own names)
First, your Shop combo (ex cboShopID) should be used to select the key
field value (ex ShopID) of the shop you selected.

Make cboShopID 2 columns, with ShopID in col1 and ShopName in col2. Make
the ColumnCount 2, with widths of 0";2", and BoundColumn= 1. Make the
ControlSource of the combo your ShopID field.

What this does is allows the user to select a ShopName in cboShop, but
really stores the ShopID in that field... while "displaying" the ShopName to
the user.

OK, now we have a ShopID selected...
Create a small subform with all the shop information you want to display
on your form. Place it on the form, and link the forms via Master =
cboShopID and Child = ShopID in the subform.
Whenever a Shop is selected in cboShopID, all the relevant information
for that Shop will be displayed in the subform... no matter what shop. You
only save/capture the ShopID in your form table... not all the associated
information. Given a ShopID, you can always re-associate it to the
appropriate shop information on any subsequent query, form, or report.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
G

Guest

WBTA!!!!
Who's Better Than Al!!!!

Thanx for the quick reply and the correct way to do this...

Thanx again,
marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top