Open a form in continuous form view

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
 
D

Damon Heron

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
 
L

Leslie Isaacs

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
 
D

Damon Heron

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
 
J

Jack Isaacs

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
 

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

Top