Update Query Syntax

swmorin

Registered User.
Local time
Today, 09:21
Joined
Jan 10, 2012
Messages
66
I am sorry to admit the previously I always have made update querys in access and then called them using the runsql command.

I have always done this because I dont understand the syntax for update querys.

can someone please assist me. below is some code I just attempted in my db that is not working.

Code:
CurrentDb.Execute ("Update tbl_courses Set tbl_courses.Blocks = '" & Me.Text5 & "',tbl_courses.coursenum = '" & Me.Text7 & "',tbl_courses.coursedate = '" & Me.Text3 & "', Where tbl_courses.courseid = me.courseid")
 
also what do I use to go to a new line while writing vba code?
 
sw,

First:


& "', Where tbl_courses.courseid = " & Me.courseid)


Second:

CurrentDb.Execute ("stuff ............" & _
"Other Stuff")

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom