open form in datasheet view (1 Viewer)

btrflym

New member
Local time
Today, 23:28
Joined
Jul 25, 2000
Messages
6
Hi,
I have a button on a form that opens another form that's supposed to be in datasheet view. However, when I click the control button, it always opens it in form view. What do I add to the macro to make it open in datasheet view?

Here's what the button does now:
---------------------------------
Private Sub records_form_Click()
On Error GoTo Err_records_form_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "broch-entries by brochure name"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_records_form_Click:
Exit Sub

Err_records_form_Click:
MsgBox Err.Description
Resume Exit_records_form_Click

[This message has been edited by btrflym (edited 07-18-2001).]
 

D-Fresh

Registered User.
Local time
Today, 23:28
Joined
Jun 6, 2000
Messages
225
Try this...

DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria

This should open it in Datasheet view...

Hope this helps.

Doug
 

Users who are viewing this thread

Top Bottom