Opening a Form in Datasheet view PROBLEM

Hargo

Registered User.
Local time
Today, 22:11
Joined
Sep 4, 2014
Messages
19
Hi

I'm trying to open a form in datasheet view using the following code

Code:
Private Sub Run_Activity_Duration_Totals_Click()
DoCmd.OpenForm ("frm_Activity_Duration_Totals_25_Hours"), AcFormView = acFormDS
End Sub

I keep getting a message saying

Compile Error:

Type Mismatch

and the equals sign is highlighted in my code

What have I overlooked?
 
Try,
Code:
Private Sub Run_Activity_Duration_Totals_Click()
    DoCmd.OpenForm "frm_Activity_Duration_Totals_25_Hours", AcFormView := acFormDS
End Sub
 
Last edited:
Thanks for suggestion pr2-eugin but it still brings back the same message


EDIT - - - - I just removed AcFormView = and now it works
 
Last edited:

Users who are viewing this thread

Back
Top Bottom