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!

run update query from form

Status
Not open for further replies.

Dawnit

Technical User
Apr 2, 2001
76
US
Hi! anyone know how I might be able to run my update query when I'm using my form and a particular field loses focus, or something similar, OTHER THAN a command box?
 
In the field's After Update or On Lost Focus event properties, you can use either of the Docmd methods for queries:

1. Docmd.OpenQuery "YourUpdateQueryName"

2. Docmd.RunSQL "UPDATE CustTable SET CustTable.Name = 'Dawn' Where CustTable.Id = 1"

The second example is the actual SQL for your update query. ljprodev@yahoo.com
Professional Development
MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top