I have an issue with the code below, i keep getting a syntax error on the red line anyone able to help??
Private Sub Command24_Click()
With CodeContextObject
On Error Resume Next
DoCmd.RunCommand acCmdSaveRecord
Beep
MsgBox "Order Successfully Updated and Progressed", vbOKOnly, ""
DoCmd.OpenQuery "Project Number Append Query", acViewNormal, acEdit
If (.MacroError <> 0) Then
Beep
MsgBox .MacroError.Description, vbOKOnly, ""
End If
End With
Dim LFolderpath As String
Dim LResponse As String
On Error GoTo NFolder
LFolderpath = CurrentProject.Path & "\NT Projects\" & [Project Number] & "_" & [Client] & "_" & [Description]
If Len(Dir("LFolderpath", vbDirectory)) = 0 Then
Application.FollowHyperlink LFolderpath
End If
NFolder:
LResponse = MsgBox("Folder doesn't exist for" & [Project Number] & "_" & [Client] & "_" & [Description] ". Would you like to create a new folder?", vbYesNo)
If LResponse = "6" Then
MkDir LFolderpath
Application.FollowHyperlink LFolderpath
Else
MsgBox ("No folder created and no folder exists")
End If
End Sub
Private Sub Command24_Click()
With CodeContextObject
On Error Resume Next
DoCmd.RunCommand acCmdSaveRecord
Beep
MsgBox "Order Successfully Updated and Progressed", vbOKOnly, ""
DoCmd.OpenQuery "Project Number Append Query", acViewNormal, acEdit
If (.MacroError <> 0) Then
Beep
MsgBox .MacroError.Description, vbOKOnly, ""
End If
End With
Dim LFolderpath As String
Dim LResponse As String
On Error GoTo NFolder
LFolderpath = CurrentProject.Path & "\NT Projects\" & [Project Number] & "_" & [Client] & "_" & [Description]
If Len(Dir("LFolderpath", vbDirectory)) = 0 Then
Application.FollowHyperlink LFolderpath
End If
NFolder:
LResponse = MsgBox("Folder doesn't exist for" & [Project Number] & "_" & [Client] & "_" & [Description] ". Would you like to create a new folder?", vbYesNo)
If LResponse = "6" Then
MkDir LFolderpath
Application.FollowHyperlink LFolderpath
Else
MsgBox ("No folder created and no folder exists")
End If
End Sub