Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

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

Back Up Your Microsoft Windows Server®

Back up 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rounding precision in MS Access 9 55
table joins in qry 17 61
VBA modules import 4 56
Pass Variable Form Name to another form in Access 16 14
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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