The “Call” procedure is new to me – I’m not sure how to use it – what’s wrong with the following?
I have the following in a module:
Function NewRecord()
DoCmd.GoToRecord , , acNewRec
End Function
*************************************************
And the following in the OnClose of a report……
Private Sub Report_Close()
If IsLoaded("InvoiceList") Then
DoCmd.Close acForm, "InvoiceList"
End If
Call NewRecord
Sub NewRecord()
DoCmd.GoToRecord , , acNewRec
End Sub
I want the report upon closing to close the “InvoiceList” Box and also switch the form to a new record. (all of the other possible “OnClose” are used and I want to learn how to use this “Call” option - it opens up all kinds of opportunities)
Any help would be appreciated
Vince
I have the following in a module:
Function NewRecord()
DoCmd.GoToRecord , , acNewRec
End Function
*************************************************
And the following in the OnClose of a report……
Private Sub Report_Close()
If IsLoaded("InvoiceList") Then
DoCmd.Close acForm, "InvoiceList"
End If
Call NewRecord
Sub NewRecord()
DoCmd.GoToRecord , , acNewRec
End Sub
I want the report upon closing to close the “InvoiceList” Box and also switch the form to a new record. (all of the other possible “OnClose” are used and I want to learn how to use this “Call” option - it opens up all kinds of opportunities)
Any help would be appreciated
Vince