Hello All,
I getting the following error from the code below. I have laid down data for hyperlinks before, in Access2003.
I am now working in Access 2010 for machines using both 2003 and 2007. For some reason, this error has only happened in code laid down in 2010.
Am I missing a change here? I can't find the problem, so any help would be appreciated. The debugger highlights the line
that starts "linkBack = "...
Best regards,
Bill
Error:
Run-time error '3075':
Syntax error (missing operator) in query expression
'RejectEntry#\\server\directory\filename#'.
Code:
If IsNull(Forms!frmTrustIntermedResponse!Reasons) = False Then
DoCmd.SetWarnings False
Dim outSlip As String
Dim linkBack As String
outSlip = "RejectEntry#\\server\directory\" & Forms!frmTrustReqDet!ReqID & "rejectentry.htm#"
linkBack = "INSERT INTO tblLinkBelt ( ReqID, LayDownDate, Flink )SELECT [Forms]![frmTrustReqDet]![ReqID] AS Expr1, Date() AS Expr2, " & outSlip & " AS Expr3;"
CurrentDb.Execute linkBack
DoCmd.OutputTo acOutputReport, "rptTrustCancellationWithFunds-html", acFormatHTML, outSlip, 0
DoCmd.SetWarnings True
Else
MsgBox "No Reasons!", vbOKOnly, "Data Missing!"
Exit Sub
End If