dkmoreland
Registered User.
- Local time
- Yesterday, 19:07
- Joined
- Dec 6, 2017
- Messages
- 129
I have a couple of questions, please.
First, I am trying to use an update query to update a field in a second table. Here's the setup:
New record is being added to the Input table - the job number field is populated and when the "Job Complete" checkbox is clicked, the Update Job Status form is opened. Once the user chooses the status and clicks Continue, I want to update the Job Status field for that job number in a second table (Job Info).
Here's my query - I'm getting a syntax error and I don't know where I have messed it up. FWIW - I inherited this database so I am not responsible for the funky field names.
Here's the other question - how do I break a code statement into multiple lines? I tried the [space] _ but I must have done it in the wrong place.
Thanks in advance for any and all input.
First, I am trying to use an update query to update a field in a second table. Here's the setup:
New record is being added to the Input table - the job number field is populated and when the "Job Complete" checkbox is clicked, the Update Job Status form is opened. Once the user chooses the status and clicks Continue, I want to update the Job Status field for that job number in a second table (Job Info).
Here's my query - I'm getting a syntax error and I don't know where I have messed it up. FWIW - I inherited this database so I am not responsible for the funky field names.
Code:
CurrentDb.Execute "UPDATE [Job Info] INNER JOIN [Input] ON [Job Info].[Job#] = [Input].[Job#] & SET [Job Info].[Job Status] = [Forms]![Update Job Status form]![cboJobStatus] WHERE (([Input].[Job#]=[Job Info].[Job#]))"
Here's the other question - how do I break a code statement into multiple lines? I tried the [space] _ but I must have done it in the wrong place.
Thanks in advance for any and all input.