Link to home
Start Free TrialLog in
Avatar of just3082
just3082

asked on

Help with Error: Too Many Line Continuations

Using VS6 SP5 on Windows 2000 Box connecting to an Access2K DB.

Below is the code I am using on a new form, I have about 25 more possible updates that I need to occur however
each time I try to add a new one I get the error mentioned in the Subject. Is there another way to do this ??

strSQL = "UPDATE projecttrack SET " & _
    "ProjectDepartment = '" & Trim(Text54.Text) & "', " & _
    "EquipmentRequested = '" & Trim(Check1.Value) & "', " & _
    "ManagerRequesting = '" & Trim(Text45.Text) & "', " & _
    "ManagerContactNumber = '" & Trim(Text7.Text) & "', " & _
    "EquipmentDescription = '" & Trim(Text8.Text) & "', " & _
    "VendorInvolved = '" & Trim(Check2.Value) & "', " & _
    "ContactPerson = '" & Trim(Text4.Text) & "', " & _
    "ContactNumber = '" & Trim(Text12.Text) & "', " & _
    "VendorName = '" & Trim(Text5.Text) & "', " & _
    "AlternateNumber = '" & Trim(Text9.Text) & "', " & _
    "MiscInfo= '" & Replace(Trim(Text10.Text), "'", "`") & "', " & _
    "ProjAssignedTo = '" & Trim(Combo2.Text) & "', " & _
    "ProjectStatus = '" & Trim(Combo3.Text) & "', " & _
    "DateCompleted = '" & Trim(Text46.Text) & "', " & _
    "ProjectPO = '" & Trim(Text33.Text) & "', " & _
    "SPRID = '" & Trim(Text42.Text) & "', " & _
    "InstructionsCreated = '" & Trim(Check5.Value) & "', " & _
    "DocumentationCreated = '" & Trim(Check6.Value) & "', " & _
    "VendorInvolved = '" & Trim(Check3.Value) & "', " & _
    "VendorName = '" & Trim(Text43.Text) & "', " & _
    "ContactNumber = '" & Trim(Text44.Text) & "', " & _
    "VendorRasAccountName = '" & Trim(Text47.Text) & "', " & _
    "VendorRasPassword = '" & Trim(Text53.Text) & "', " &        <<<  When I try to place "_" is when I get the error....
    "HardwareDescription = '" & Trim(Text16.Text) & "' " & _
    "WHERE EventId = " & Text48
 cnConn.Execute strSQL

Thanks, Alot..

Just3082
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can also do it this way:

strSQL = "UPDATE projecttrack SET " 
strSQL = strSQL &    "ProjectDepartment = '" & Trim(Text54.Text) & "', " 
strSQL = strSQL &    "EquipmentRequested = '" & Trim(Check1.Value) & "', "
strSQL = strSQL &    "ManagerRequesting = '" & Trim(Text45.Text) & "', " 
strSQL = strSQL &    "ManagerContactNumber = '" & Trim(Text7.Text) & "', " 
strSQL = strSQL &    "EquipmentDescription = '" & Trim(Text8.Text) & "', " 
strSQL = strSQL &    "VendorInvolved = '" & Trim(Check2.Value) & "', " 
strSQL = strSQL &    "ContactPerson = '" & Trim(Text4.Text) & "', "
strSQL = strSQL &    "ContactNumber = '" & Trim(Text12.Text) & "', "
strSQL = strSQL &    "VendorName = '" & Trim(Text5.Text) & "', " 
strSQL = strSQL &    "AlternateNumber = '" & Trim(Text9.Text) & "', "
strSQL = strSQL &    "MiscInfo= '" & Replace(Trim(Text10.Text), "'", "`") & "', "
strSQL = strSQL &    "ProjAssignedTo = '" & Trim(Combo2.Text) & "', "
strSQL = strSQL &    "ProjectStatus = '" & Trim(Combo3.Text) & "', "
strSQL = strSQL &    "DateCompleted = '" & Trim(Text46.Text) & "', "
strSQL = strSQL &    "ProjectPO = '" & Trim(Text33.Text) & "', "
strSQL = strSQL &    "SPRID = '" & Trim(Text42.Text) & "', "
strSQL = strSQL &    "InstructionsCreated = '" & Trim(Check5.Value) & "', "
strSQL = strSQL &    "DocumentationCreated = '" & Trim(Check6.Value) & "', "
strSQL = strSQL &    "VendorInvolved = '" & Trim(Check3.Value) & "', "
strSQL = strSQL &    "VendorName = '" & Trim(Text43.Text) & "', "
strSQL = strSQL &    "ContactNumber = '" & Trim(Text44.Text) & "', "
strSQL = strSQL &    "VendorRasAccountName = '" & Trim(Text47.Text) & "', " 
strSQL = strSQL &    "VendorRasPassword = '" & Trim(Text53.Text) & "', " 
strSQL = strSQL &    "HardwareDescription = '" & Trim(Text16.Text) & "' " 
strSQL = strSQL &    "WHERE EventId = " & Text48

AW