Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Value of a Field in a Particular Reccord

Status
Not open for further replies.

Carrion

Technical User
Jul 26, 2002
27
US
Within Access, I need to be able to isolate a particular record, in a table not at all bound to this form. And, in a specific field I want to reassign the value. I am dealing with the primary key of the table so I am sure of the particular record. Is there a way to do this in VBA. I was thinking something like:

Dlookup("Fieldname","tblContacts","tblContacts!ContactID = ID") = FieldOnForm
 
Something like this ?
DoCmd.RunSQL "UPDATE tblContacts SET Fieldname='" & Me!ControlOnForm & "' WHERE ContactID=" & Me!ID

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top