Automatically putting address in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In access 2000 how do yo do this. From a pull down menu in your form you
select the business you want. How so you automatically get the address of
that business to display on the form with out typing the address in. In case
the user does not know the address of that business

Thanks very much for any help.
 
Either 1) base your form on a query that includes the address fields, or 2)
include these fields as columns in the combo box where you select the
customer, and use the Column property. You can prevent the columns from
displaying in the drop-down list by setting their width to 0" in the combo
box' Column Widths property.

The Column property is zero-based, i.e., the first column is referred to as
column 0. For example, if the Address1 field is the third column in a combo
box named MyCB, you can assign it to a textbox by setting the textbox'
Control Source property to:

=MyCB.Column(2)

HTH
Sprinks
 
Sprinks,
I am having a little problem baseing my form on a query that includes the
address fields. Could you give me some advice on how to do this.

Thanks,

K
 
Hi, K.

Open your form in design view. Show the Properties window (View,
Properties), then click on the small square at the top left corner of the
window to display the form's properties. Under the Data tab, see what is
specified in the RecordSource property. This may be a table or a query.

If it is a table, design a new query, and select this table and your
Customer table. Be sure they are linked by the Customer Number. If not,
drag the Customer number from one of the tables to its corresponding field in
the other to establish the link.

Now drag all fields from the main table, and any others from the Customer
table that you'd like to display, and save the query.

Go back to your form and change the RecordSource to the name of your query,
and place textboxes on your form bound to the address fields. If you don't
want to give your users the option of changing any of these fields, set the
Enabled (greyed out) to No or the Locked property of these controls to Yes.

Now, when the user enters the customer number, the associated fields will
display on your form.

HTH
Sprinks
 
Back
Top