combo boxes and text boxes

  • Thread starter Thread starter slzihc
  • Start date Start date
S

slzihc

Guest
I have a table that has client names and addresses. I have designed a form to be able to invoice these clients and everything is fine however what I'd like to do is have the address of the client appear automatically.

I have set the client names in a combo box and would like their address to appear in either a text box or sunken label automatically from the table. Is this possible and how do I do it.

Please keep in mind that I've done basic programming so please be kind to this newbie :D
 
you can this on the Northwind database. the invoice form has this.

good luck,

sam
 
There is no code require to do what you want.

Have a look at the attached sample.
 

Attachments

Last edited:
ansentry said:
There is no code require to do what you want.

Have a look at the attached sample.

thanks for your help ansentry. i see what your database was like and it's pretty much what i want it to do but i cant figure out how you did it.

a bit more explanation

we have work order books that we have to fill out. to somewhat avoid the paper work, some of us wanted to streamline it a little by using a database. we then want specific information from the database to go into a spreadsheet (not 100% sure how its to be done but i'll cross that bridge when i get to it). the following is roughly what the forms in the work order book look like.

http://slzihc.customer.netspace.net.au/workorder.jpg

1. is the order number that is already on the work order book. this will be manually inputted
2. is the name of the client to be charged (currently a combo box and works fine)
3. is the job code. at my site it can be 2 different codes thus why there is a combo box
4. is the site address and where im currently having my problem.
5. & 6. i have marked out to say that they will have to be manually inputted coz there can be different contacts from the one client thus the phone number changes and so does the authorisation. prolly a little too complex for me to do anything automatic with those.
7. is there only for when we use a contractor. will be a combo box

anyways, i have 4 tables:
Clients
Contractors
Job Codes
Work Order

the work order table is the "database" im working on and is the picture that i have provided

clients is self explainatory. contains client company name and address only

contractors is who is used for the job if any special job is required

job code is an option of 2 codes depending on where the job is done.

the only thing im trying to do now is have site address display in accordance with client name. maybe i dont have enough information in the tables or incorrect primary keys. i dont know. databases are great but i havent used them much and now this is doing my head in :eek:
 
Did you have a look at how the query that is the source for the form (frmData)works?

When you do look at it, note the colours that used to demo the different sources for the form.

In the form (frmData) have a look at the combo box you will see that it get its data from the customer table (via a query) BUT the customerID is "Stored" in the data table because I made the combo's datasource the fkCustomerID from the tblData.

If you have a look at the Northwind db that comes with Access you will see that they do their Orders in a similar way.

If you have a good look it will fall into place.

If you want to see another sample of mine then >>Click Here <<<

My Sample is down the bottom, it may give you some ideas.

Good Luck
 

Users who are viewing this thread

Back
Top Bottom