Call?

T588

Registered User.
Local time
Today, 06:55
Joined
Feb 3, 2003
Messages
65
Below is an simple example of vb associated with a command button (Print)

Option Compare Database

Private Sub PrintRecord_Click()
On Error GoTo Err_PrintRecord_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Exit_PrintRecord_Click:
Exit Sub

Err_PrintRecord_Click:
MsgBox Err.Description
Resume Exit_PrintRecord_Click

End Sub

**********************************************
And this is simple code I placed into a module to create a new record.

Option Compare Database

Function NewRecord()
DoCmd.GoToRecord , , acNewRec
End Function

**********************************************
Problem……Where do I place: Call NewRecord. Everywhere I attempt to put it in the code – it either won’t work or I get an error message saying : Compile Error / Invalid use of Property

What am I doing wrong?
Vince
 
Nevermind - I just read my last post
Thank You!
 

Users who are viewing this thread

Back
Top Bottom