Update Query SQL Code (1 Viewer)

galvinjaf

Registered User.
Local time
Today, 07:37
Joined
Jan 5, 2016
Messages
108
Good Morning,

I am attempting to run an update query, but can't get the code right at all. I have run a query with my data that needs to be changed and am hoping someone can help me out.

Attached is my query, and form/subform with the tab;es that need to be adjusted.

Assuming my query is set up correctly, I'm trying to say that, "If the Transfer Pass field in tblAIB_HolesFilled is selected (checkbox for YES, then prompt for a Date_Late (to enter a date that employee was late into tblAIB_DatesLate) and take the Pass_Issued from the tblAIB_HolesFilled, and place that into the Reward_Pass_Issued in tblAIB_DatesLate

Can this be done?
 

Attachments

  • Capture.JPG
    Capture.JPG
    47 KB · Views: 119
  • Capture2.JPG
    Capture2.JPG
    61.1 KB · Views: 108

galvinjaf

Registered User.
Local time
Today, 07:37
Joined
Jan 5, 2016
Messages
108
Yea, I figured that much out. I was hoping someone would be able to help/teach me how to go about the sql language, and how to get my statement from above, into a sql statement.
 

fsjavan

New member
Local time
Today, 04:37
Joined
Apr 15, 2016
Messages
5
Here is what I did to figure out the update queries. In Access once I got the query to do what I wanted I changed the view to SQL view. At that point I could see the SQL statement. Then I wrote the SQL statement to a string variable and did debug.print so I could see the statement in the immediate windows to verify it looked the same as it did in the access SQL query.

One thing I did notice and I adjusted was what looks like an extra set of () in the WHERE statement in the access SQL view. I took the extra set out in the VBA code.
 

Users who are viewing this thread

Top Bottom