Form view when opened

BobNTN

Registered User.
Local time
Today, 17:42
Joined
Jan 23, 2008
Messages
314
I am opening a form from a form with a command button. The second form's default view is datasheet view but when I open with the button, it doesn't open in datasheet view.
I am assuming I need to edit this on_click code somewhere ?

Code:
Private Sub CmdBtnChargereasons_Click()
On Error GoTo Err_CmdBtnChargereasons_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "FrmChargenote"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_CmdBtnChargereasons_Click:
    Exit Sub

Err_CmdBtnChargereasons_Click:
    MsgBox Err.Description
    Resume Exit_CmdBtnChargereasons_Click
 
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
The default is acNormal which opens the form in Form View and overides the default view of the form.
 
Thanks RuralGuy
 

Users who are viewing this thread

Back
Top Bottom