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 ?
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