I assume you are talking about Visual Basic for Applications (VBA), the
programming language of Microsoft Access (and other software), which is what
you show. "vbscript" is something else entirely -- executed by the Windows
Scripting Host.
Try placing your cursor after the formname "Entries", which should present
Intellisense (if you are using a recent version of Access -- it's always a
good idea to state the version you are using in your Question), and entering
commas, until you get to the DataMode argument, and the Intellisense for
that should be obvious (acFormAdd). If you are using an older version or
Intellisense just isn't working, then place your cursor in the "OpenForm"
and press F1 for Help to see what the arguments provide as options?
Larry Linson
Microsoft Access MVP
<f.***********@comcast.netwrote in message
news:11**********************@31g2000cwt.googlegro ups.com...
Hello all,
Having an issue with the VB script to open a form...well not really an
issue just a feature I'm not sure if it is possible. Th script opens
a form but I would like it to open to a blank record.
Private Sub Entries_Click()
On Error GoTo Err_Entries_Click
If IsNull(Me![Last Name]) Then
MsgBox "Enter contact information before making an entry."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
DoCmd.OpenForm "Entries"
End If
Exit_Entries_Click:
Exit Sub
Err_Entries_Click:
MsgBox Err.Description
Resume Exit_Entries_Click
End Sub
Any ideas?