Passing a value into a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I pass the a value from a form to the record in the table with code

For example. I want to pass the value in comboBoxA to Column1 in Table

Thank you
 
You have many options for that.
If the form is bound to the table, you can use

Me!Column1 = Me.comboBoxA

if the form does not use the field Column1, you need to decide which
record of the table should be updates with the value from comboBoxA.
Once you have the criteria for selecting the record, you can execute
code like this:

DoCmd.RunSQL "UPDATE TableB SET Column1 = " & Me.comboBoxA & " WHERE >Criteria<"

Good luck,
Pavel
 
Back
Top