I need to connect the field... Title and Subject in an update sql statement. This is what I have.:
DoCmd.RunSQL "UPDATE [Phone Calls] SET [Phone Calls].[Date Responded] = [Forms]![Fax Form]![Date], [Phone Calls].Comments =[Forms]![Fax Form]![title]&" "&[Forms]![Fax Form]![Subject],[Phone Calls].Notes = -1,[Phone Calls].Solved = -1 WHERE ((([Phone Calls].[CO ID])=[Forms]![Fax Form]![CompanyID]));"
What this sql statement does is updates the table call Phone Calls, to reflect that this customer was responded to and about what. In this particular instance, this customer was sent a faxed so I want to automatically join the title field on the Fax Form, which the value of the title field is fax, with the subject field on the Fax Form which the value of the Subject line is in the control of the user. So if a user was to send a customer a fax about a golf event. The subject would read:
Subject:
Golf Outing
I would then want the notation in the Phone Calls table to read
Comments:
Fax: Golf Outing
It sounds pretty complicated, I'm sure if I design a query I can get it done, but I would like to know how to mark it up in Visual Basic. For some reason when I copy the code from the SQL view, into the form module, it gives me an error
DoCmd.RunSQL "UPDATE [Phone Calls] SET [Phone Calls].[Date Responded] = [Forms]![Fax Form]![Date], [Phone Calls].Comments =[Forms]![Fax Form]![title]&" "&[Forms]![Fax Form]![Subject],[Phone Calls].Notes = -1,[Phone Calls].Solved = -1 WHERE ((([Phone Calls].[CO ID])=[Forms]![Fax Form]![CompanyID]));"
What this sql statement does is updates the table call Phone Calls, to reflect that this customer was responded to and about what. In this particular instance, this customer was sent a faxed so I want to automatically join the title field on the Fax Form, which the value of the title field is fax, with the subject field on the Fax Form which the value of the Subject line is in the control of the user. So if a user was to send a customer a fax about a golf event. The subject would read:
Subject:
Golf Outing
I would then want the notation in the Phone Calls table to read
Comments:
Fax: Golf Outing
It sounds pretty complicated, I'm sure if I design a query I can get it done, but I would like to know how to mark it up in Visual Basic. For some reason when I copy the code from the SQL view, into the form module, it gives me an error