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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving data from 3 columns of a como box to 3 fields in a table

Status
Not open for further replies.

Kelvin

Programmer
Apr 25, 2000
23
AU
Please Help,
I have a combo box with 3 columns and when on click on the combo box and select the first column I would like to transfer the information from the other 2 columns and put into its fields in a table. IE 3 control scources
I would like to do it with out operating a query.

Thanking you

Kelvin
 
Why would you want to put data you already have into another table? Wouldn't this be redundant?
 
Hi Jerry,
Thank you for your reply,
What I am trying to do is I cannot link a query, I pick up the three columns from a different table say setup. in my form and on the combo box I have, column 1 - currency, column 2 - exchangeRate, column 3 - Symbol.
When i select the combo box in the form which has information from each field (column), when I close the combo box transfer the information to another table IE 3 fields.
It works for the first column because i transfer the data by using the control scource. but not the 2nd and 3rd
It sounds simple but I seam to be missing it.
Regards Kelvin
 
Hi,

This was my response to a similar request (thread: Form help)

Each column in a combobox can be referenced eg:
Forms.[theFormName].[cmbControlName].Column(0)
references the first column (nb: the first column is 0)

On the OnChange or AfterUpdate event of the combo, you can set the values of the fields you want, eg
Me.UpdateField1= Me.[cmbControlName].Column(1)
Me.UpdateField2= Me.[cmbControlName].Column(2)


This means new records will be created with the latest info, and existing records will retain the original data (as opposed to query always returning the latest info).

Hope this helps

Cheers
 
Hi SDK,

Thank you for your input.
It works very well.
Regards Kelvin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top