By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

NorthWind Example Question

P: n/a
OK, on the Form called Orders, there is a combobox that allows you to
select customers. The form then populates all the textboxes below it
with the customer information (called: address, city, region, etc...)

How does it populate these textboxes. I have looked in the afterupdate
function for the combobox but there is nothing no code in there that
populates the textboxes mentioned above. What is access doing and how
do you set it up???
Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Open the Orders form in design view.
Open the Properties box.
Ensure the Title of the Properties box says "Form" so you are looking at the
properties of the form, not those of a text box.
Locate the Record Source property (Data tab).

The Record Source is a query.
Open the query in design view.
You will see that the query contains two tables - Orders and Customers.
When you select CustomerID on the form, the query automatically fetches the
matching details from the Customers table.

When you combine multiple tables in the query that is the Record Source of a
form, if you are not careful you will end up with a read-only form, or one
that cannot accept new records, or one that deletes information from the
wrong table (e.g. deleting the customer when all you wanted was to delete an
order).

In general, you are safe if all the editable fields are from the related
table (the "many" side of the relationship), and the other table is just
used as a lookup. That is the case in the Northwind example. In addition,
you will notice that the text boxes bound to fields from the Customers table
(such as the Address field) have their Enabled property set to No and their
Locked property set to Yes. This helps prevent unintentional changes.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"Mark" <mc******@uoguelph.ca> wrote in message
news:14**************************@posting.google.c om...
OK, on the Form called Orders, there is a combobox that allows you to
select customers. The form then populates all the textboxes below it
with the customer information (called: address, city, region, etc...)

How does it populate these textboxes. I have looked in the afterupdate
function for the combobox but there is nothing no code in there that
populates the textboxes mentioned above. What is access doing and how
do you set it up???
Thanks

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.