Populating Text boxes

crann

Registered User.
Local time
Today, 15:53
Joined
Nov 23, 2002
Messages
160
Help needed, cannot sort this out :banghead:

So I have a very simple database I have two tables, table one (Master Info) holds a list of property addresses & information this is my master list containing all the property addresses I use. The second table (Property Info) contains various fields to store information that is entered in a form that i use to keep track of safety checks i,e date of next check, type of check etc

I am trying to do the following:

On the form (Property Info) I want a combo box populated from the (Master Info) table, that I do can fine but i want it to populate some text boxes with the other information from the Master table i,e post code, type of property. I then need to store that new selection into the table (Property Info)

I can create combo boxes with the wizard that find files based on what I select in the combo box but don't know how to save that forms info back to the (property Info) table

In summary, combo box from one table saved into a different table with additional fields through a form

Does this make sense to anyone?

Thanks for any help

Its driving me crazy
 
i want it to populate some text boxes with the other information from the Master table
bring the information through in the your rowsource for your master table combo.

in your textbox controlsource put

=cbomastertable.column(x)

where cbomastertable is the name of your combo control and x is the column number (first column is 0)

I then need to store that new selection into the table (Property Info)
You should not be duplicating information stored in the db so cannot see why you would need to do that - just refer to the master table when required - your property table should have field which links back to your master table
 
Hi CJ

Thanks for coming back, unfortunately I am a beginner with access so struggling to make sense.

I have quickly created a new database just to practice this combo issue rather than mess up my main database.

This is what I have table 1 is called mastertable three fields all text
(saved with a primary key)?

Field one: address
Field two: type
Field three: age

Table two
(saved with a primary key)?

Field one: address
Field two: type
Field three: age
Field four: material
Field Five: bedrooms

created a blank form called property, on this form a combo box with row source from mastertable for address

so now I have a form with a combo box that displays the addresses as listed in the mastertable.

I add a text box under the combo box and want it to display the "age" from the mastertable based on the value in the combo box.

so when I select a property address from the combo box the age text box is populated with the appropriate age

Am I completely thick or is there hope

Thanks
Jon
 
You need to backup and tell us the story: what is this application about? What do you expect to use it for? Right now we cannot tell from the nitty gritty details whether you are building a parking lot or an aircraft carrier, so hard to advise :D

In any case you seldom store age of anything, because tomorrow that would become a different number. Ages are normally calculated from some stored date and onwards. In fact anything that can be calculated from data in the db is hardly ever itself stored in a properly designed db.
 
Am I completely thick or is there hope
There is always hope...:D

The example you have chosen does not make sense - any property would be described with one table with the fields you are using, combining both sets of data. The only exception perhaps being a block of apartments, in which case

1. material would be moved to table1
2. table 1 would also have a primary key of type autonumber
3. table 2 would then consist of

apartmentPK apartmentno
table1FK long
ApartmentNo integer
No of bedrooms integer

As spike suggests, storing age is the wrong data to store because next year it will be wrong, suggest instead you have year of build or similar where you can then calculate the age

suggest you need to research (i.e google) use of primary keys, relationships and normalisation before continuing
 

Users who are viewing this thread

Back
Top Bottom