Open a form in continuous form view

  • Thread starter Thread starter Leslie Isaacs
  • Start date Start date
L

Leslie Isaacs

Hello All
I have a form with the default vew set to 'continuous forms', but when I open it from code behind a buton it keeps reverting to 'single form' view. I know that if I want it to open in datasheet view I can use acFormDS in the DoCmd.OpenForm command, but what is the equivalent for continuous forms view?
Hoep someone can help.
Many thanks
Les
 
What is your event code on the button? I cannot duplicate this when I open a continuous form from a cmdbtn.

Damon

Hello All
I have a form with the default vew set to 'continuous forms', but when I open it from code behind a buton it keeps reverting to 'single form' view. I know that if I want it to open in datasheet view I can use acFormDS in the DoCmd.OpenForm command, but what is the equivalent for continuous forms view?
Hoep someone can help.
Many thanks
Les
 
Hello Damon

Thanks for your reply.
The code behind the button is below. You will see that I have two DoCmd.OpenForm commands: the one with the acFormDS parameter is remmed out, but works otherwise - i.e. the form opens in datasheet view. But with the code as it is below the form opens in single form view.
Hope you can help
Thnaks
Les


Private Sub Command14_Click()
On Error GoTo Err_Command14_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frm gp bags removed"
' DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command14_Click:
Exit Sub

Err_Command14_Click:
MsgBox Err.description
Resume Exit_Command14_Click

End Sub

What is your event code on the button? I cannot duplicate this when I open a continuous form from a cmdbtn.

Damon

Hello All
I have a form with the default vew set to 'continuous forms', but when I open it from code behind a buton it keeps reverting to 'single form' view. I know that if I want it to open in datasheet view I can use acFormDS in the DoCmd.OpenForm command, but what is the equivalent for continuous forms view?
Hoep someone can help.
Many thanks
Les
 
Are you absolutely sure it is not in continuous view? grab the form and resize it vertically.

Damon



Hello Damon

Thanks for your reply.
The code behind the button is below. You will see that I have two DoCmd.OpenForm commands: the one with the acFormDS parameter is remmed out, but works otherwise - i.e. the form opens in datasheet view. But with the code as it is below the form opens in single form view.
Hope you can help
Thnaks
Les


Private Sub Command14_Click()
On Error GoTo Err_Command14_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frm gp bags removed"
' DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command14_Click:
Exit Sub

Err_Command14_Click:
MsgBox Err.description
Resume Exit_Command14_Click

End Sub

What is your event code on the button? I cannot duplicate this when I open a continuous form from a cmdbtn.

Damon

Hello All
I have a form with the default vew set to 'continuous forms', but when I open it from code behind a buton it keeps reverting to 'single form' view. I know that if I want it to open in datasheet view I can use acFormDS in the DoCmd.OpenForm command, but what is the equivalent for continuous forms view?
Hoep someone can help.
Many thanks
Les
 
Damon
I am now not at work - which is where the problem is - so I cannot check that ... but I have a horrible feeling you may be right!!!!
I'm back at work on Friday (day off tomorrow!), and will post back then.
Thanks again for your help.
Les

Are you absolutely sure it is not in continuous view? grab the form and resize it vertically.

Damon



Hello Damon

Thanks for your reply.
The code behind the button is below. You will see that I have two DoCmd.OpenForm commands: the one with the acFormDS parameter is remmed out, but works otherwise - i.e. the form opens in datasheet view. But with the code as it is below the form opens in single form view.
Hope you can help
Thnaks
Les


Private Sub Command14_Click()
On Error GoTo Err_Command14_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frm gp bags removed"
' DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command14_Click:
Exit Sub

Err_Command14_Click:
MsgBox Err.description
Resume Exit_Command14_Click

End Sub

What is your event code on the button? I cannot duplicate this when I open a continuous form from a cmdbtn.

Damon

Hello All
I have a form with the default vew set to 'continuous forms', but when I open it from code behind a buton it keeps reverting to 'single form' view. I know that if I want it to open in datasheet view I can use acFormDS in the DoCmd.OpenForm command, but what is the equivalent for continuous forms view?
Hoep someone can help.
Many thanks
Les
 
Back
Top