Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables - one combo box fills in Field of another

Status
Not open for further replies.

TekkieDave

Technical User
May 22, 2002
98
US
I know this is possible in Forms, in fact I have done it in forms, but how can I set up my table so that selecting a value in a combo/list box plugs in information into other fields?

What I have is a combo box for Last name. This pulls information from a user names table that contains First/last name, location, e-MAIL, etc. What I want is that once the last name is selected, the fields for the first name etc will be plugged in.

I managed this in a form, but I can't seem to figure this one out.

Any help would be appreciated,

David
 
Hi

This sounds like you are updating tables directly, this is bad news, tables should be updated via forms.

I would also question why you are saving the data twice, there are reasons (sometimes) to do this, but unless ESSENTIAL it too is bad news

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
David,

A table is merely a repositry for data, technically you shouldn't use it to perform any calculations or functions other than storeage.

Yes this will work on a form, but to my knowledge there's no way of doing it directly in the table.

Hope this helps.

Leigh Moore
Solutions 4 MS Office Ltd
 
I think I was unclear about what I really want to happen.

I do have a form I use to update this table. The only thing is that when i select a last name, the form plugs in the first name etc, and this is not updated on the table. The only thing updated on the table is the last name. The others remain at the default.

How can I have exactly what is shown on the form put into the table?

 
Hi

Subject to my comments about not storing tjhe same data in 'n' places

On the form have a hidden control, which is bound to the FirstName (say txtFirstname), assuming the control populated from the combo is txtFName (I assume the source for this control is something like =cboName.Column(1) )

In the Before Update Event put code so txtFirstName = txtFName

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top