Question : Trying to insert Column from combo box to table

Hello,

I am trying to insert the value of a specified column in a comb box to a table but can't seem to get it to work.

The table for the combo box has the following columns:
EmpID, LastName, FirstName, Active, Email
The row source for the above combo box is:
SELECT DISTINCTROW MedReim.EmpID, MedReim.LastName & ", " & MedReim.FirstName, MedReim.Email AS Expr1 FROM MedReim WHERE (((MedReim.Active)=Yes)) ORDER BY [LastName];
(This displays the persons name in the combo box based on the EmpID)

and finally, the code that is supposed to insert the "Email" column into a table called "Email" is:
CurrentDb.Execute ("UPDATE [Email] SET Email = '" & Me.MedReim.Column(4) & "'")

Me.MedReim is the combo box and column 4 is where the Email address is stored.

This is killing me... any help would be greatly appreciated!

Thanks!

 

Answer : Trying to insert Column from combo box to table

Does the table you are trying to add email to already have a field for this?

What is the name of the table?
What is the name of the field?

How are you trying to do this ... are you updating through a form or are you trying to update an entire table at one time?

Why do you need to store the email address more than 1 time per person?

Steve
Random Solutions  
 
programming4us programming4us