Solved

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

Posted on 2013-02-07
1
208 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now