Passing a value into a table

B

Brian

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
 
P

Pavel Romashkin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top