I know it should be a basic one, but it doesn't seem to work

Bullet

New member
Local time
Today, 19:23
Joined
Mar 2, 2009
Messages
8
Hey guys,

Ive got a drop down list with 5 columns

Name, Address, Town, Postcode & Phone No.

Below it ive got text boxes for address, town, postcode & phone

What im trying to do is set up the text boxes so that they show the information about whichever person is selected from the drop down list.

However despite all my efforts i cant find a way to get the text boxes to show the relevant info once its been selected from the drop down list,

Rather they all seem to display the town...


Could someone please help me

Kind Regards
Bullet
 
If the dropdown is a combobox with 5 fields, then you can refrence the diffrent column by its number.

For the textbox "Adress" put this in the Control Source.

Code:
=Dropdown.column(1)

Replace "Dropdown" with the name of your combobox. Remember that comboboxes are zerobased, so column number 1 eqauals 0 etc.

JR
 
In the data source for each text box you will need the following;

Code:
=ComboName.Column([COLOR="Purple"][B]#[/B][/COLOR])

Replace # with the column number that hold the information you want in the text box. Remeber the columns are numbered from zero up the first column (Zero) is usually, but not always, hidden and bound to the Data Source.
 
Wow, i knew it would be something basic like that... I'd tried "col." and ".col" and other similar variations, thats working perfectly, thankyou soo much guys !! =D =D =D

Regards Bullet
 
Thats brilliant thankyou so much,

I thought it would be something basic like that,
Its one of those things though if you don't know the exact phrasing you can spend hours on it !


Kind Regards
Bullet
 
heres a trick with a combo box

say you have a comb box for name with columns

nameid, lastname, firstname with widths 0,3,3 say

when you pick a name the drop down shows you

smith john
jones mike
rogers pete

but after you select an entry, you just see the surname - smith, say. (which is why you add another textbox to get the other column)

---------
instead, add an extra column to the query, fullname: defined as lastname & "," & firstname that drives the combobox and have the columns in order

nameid, fullname, lastname, firstname

now in the combo box, make the widths 0, 0.1, 3,3 - 0.1 is significant

when you use the combo box, it will still show you the same selections as before, but when you select an item, it will display the fullname (ie surname AND firstname), because what a combobox ACTUALLY displays is the first non-zero width column - ie the 0.1 width column.

Very useful for providing a friendly interface
 

Users who are viewing this thread

Back
Top Bottom