Thanks, but I do have the ON
before: error resume next
I just left it out by mistake when I posted, sorry.
@MajP It just keeps giving me an error, saying it is not there, which I know but have code within the button to determine that.
I originaly got the Function code from Tek-Tips.
I use the Functions within my buttons i.e.
That produces a msgbox saying the report does not exist, as below.
This was working for 8-10 months, I don't know if my IT dept changed anything, but they have not found out yet.
I have listed my current references for the project above.
Private Sub SrRunQuery_Click()
'*SERVICE REQUEST SR RUN QUERY BUTTON**********
On Error GoTo Err_SrRunQuery_Click
Dim stDocName As String
stDocName = ListSR.Column(2)
If Not QueryExists(stDocName) Then
msgbox stDocName & " query doesn't exist, RUN the REPORT!", vbExclamation, "Run The REPORT!!!"
ElseIf Not Me.SubFrmInput.Form.txtEndDate.Enabled = True Then
DoCmd.OpenQuery stDocName, acNormal, acEdit
ElseIf IsNull(Me.SubFrmInput.Form.txtStartDate And Me.SubFrmInput.Form.txtEndDate) Then
Else: DoCmd.OpenQuery stDocName, acNormal, acEdit
End If 'If Not QueryExists(stDocName) Then
Any help you can give would be greatly appreciated!
This is really getting me down, it worked once...
Thank you again for all your help.