Datasheet view

PeteJM

Registered User.
Local time
Today, 16:12
Joined
Oct 31, 2004
Messages
28
Hi, I have some forms in my database that are in Datasheet view. These open fine wheni open them directly but when i open them from a command button they only open as a single record.

Is there a way i can get them to open in datasheet view from the command button.

Regards

Pete
 
Hello

Hello. Put the following on your command button:
Code:
Private Sub cndOpenForm_Click()
On Error GoTo Err_cndOpenForm_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "YOURFORMNAMEHERE"
    DoCmd.OpenForm stDocName, acFormDS, stLinkCriteria
        

Exit_cndOpenForm_Click:
    Exit Sub

Err_cndOpenForm_Click:
    MsgBox Err.Description
    Resume Exit_cndOpenForm_Click
    
End Sub
Regards,
Phil.
 
Thank you

Thank you very much for your help. :)

Regards

Pete
 

Users who are viewing this thread

Back
Top Bottom