combo box question

  • Thread starter Thread starter DungeonAccess
  • Start date Start date
D

DungeonAccess

I am pretty new to Access and I am slowly learning its quirks. Am I guessing
right that perhaps when you use wizards that it puts some extra code in the
application somewhere? I am using Access 2000 and I am making a stand alone
Access application. What I am trying to do is something similar to the
Orders form in the NW sample. What I would like to replicate for my project
is the combo box where you select a customer ID and then it automatically
populates the fields like Address, City, Region, Postal Code, and Country
based on the Customer selected. I like the idea of this because it helps the
user speed things up and they don't have to remember all the address info. I
want to do this in my application, but can not figure out how to do it.
Actually, I want to do things a little differently than the NW sample. I
want to still be able to use a combo box for the CustomerID and have it
populate a "Bill To" section, but I am needing to populate a "Ship To"
section with a different Address, City, etc. See, in the NW example, when
you select the Customer ID in "Bill To", it autopopulates both sides with
the same data. I actually need to have seperate data for the "Ship To" and
"Bill To" sides. What I meant by my comment earlier is that, when I look
through the code, or even all the properties, I can not figure out where it
actually says to populate even the first side ("Bill To"). I know how it
does the other side when it does:

Me!ShipName = Me![CustomerID].Column(1)
Me!ShipAddress = Me!Address
Me!ShipCity = Me!City
Me!ShipRegion = Me!Region
Me!ShipPostalCode = Me!PostalCode
Me!ShipCountry = Me!Country
Me!ShipName = Me!CompanyName

I understand all this. I just can not figure out how it populates the
initial section automatically!!! Am I making sense? Any body have any
suggestions? I would like to pull the data from the Customers table and
select "Ship To" and "Bill To" with the cbos, and then store the data in the
Orders table if that makes any sense.



Thanks in Advance,
DA
 
DungeonAccess said:
I am pretty new to Access and I am slowly learning its quirks. Am I guessing
right that perhaps when you use wizards that it puts some extra code in the
application somewhere? I am using Access 2000 and I am making a stand alone
Access application. What I am trying to do is something similar to the
Orders form in the NW sample. What I would like to replicate for my project
is the combo box where you select a customer ID and then it automatically
populates the fields like Address, City, Region, Postal Code, and Country
based on the Customer selected.
In this case no code should be needed.
The form is based on a query which relates the customer table to the Orders
table using the Customer ID. When the combobox populates the Orders!CustID
Access automatically fills the other fields.
 
when you say it automatically populates the other fields, how can I
replicate that. In other words, if I have another combo box, and I want to
autofill some other fields, is Access going to know to just do that too?
 
DungeonAccess said:
when you say it automatically populates the other fields, how can I
replicate that. In other words, if I have another combo box, and I want to
autofill some other fields, is Access going to know to just do that too?
Doing what I describe is fundamental to relational database management.
Read help on what a relational database is, read about queries and examine
some of the Northwind database.
 
Back
Top