Changing view of subform

  • Thread starter Thread starter Domac
  • Start date Start date
D

Domac

Hi,

How to switch form Datasheet view to Form view using code???


Thanks in advance!


Domagoj
 
Sorry , i mean Subform !

How to switch Subform from Datasheet view to Form view?


Thanks!
Domagoj
 
Don't think you can after it's loaded, you have to set it's default open
mode in design view

Pieter
 
You can switch a subform between datasheet and form view ...

Private Sub Command1_Click()

Me.NameOfSubformControl.SetFocus

'1 = form view, 2 = datasheet view ...
If Me.NameOfSubformControl.Form.CurrentView = 1 Then
DoCmd.RunCommand acCmdSubformDatasheetView
Else
DoCmd.RunCommand acCmdSubformFormView
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Detail format problem! 3
Modal report 5
Subform 8
Switching to Datasheet View 2
Form View 1
SubForm Issue In Main Form Datasheet View 2
Subform won't save as datasheet 3
2 same subforms 1

Back
Top