Solved

How write value of field on a form to a table field

Posted on 2013-02-07
1
213 Views
Last Modified: 2013-02-07
I have a form named frmDocs.  On the form is a field named "txtEmail".  The value of the field came from a query using tblContacts.

When the user changes the populated value in the field I want to update the field in tblContacts named txtEmail to be what the user changed it to by clicking a command button named cmdUpdateEmail.

What would the onclick event be for the command button?
0
Comment
Question by:SteveL13
1 Comment
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 38865286
Something like this (with your own names):

dim s as string
s = "UPDATE tblContacts SET txtEmail = '" & Me.txtEmail & "' WHERE ContactID = " & Me.ContactID
currentdb.execute s, dbfailonerror

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question