 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 8th, 2004, 04:06 PM
|
|
Authorized User
|
|
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Add button on a form with datasheet view
I tried to add a button "Close Form" on to a form which I want to have datasheet view. I could not find the button after changing from Design View to Form View. What is wrong?
Thanks in advance for any suggestion,
L.X.
|
|

March 8th, 2004, 04:10 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can't add things to datasheet views.
If you need to, you'll have to settle for making your form look similar to datasheet view by making it in Continuous view.
Either that, or make it a subform of a larger Single form and add the buttons to the main form.
I am a loud man with a very large hat. This means I am in charge
|
|

March 8th, 2004, 05:08 PM
|
|
Authorized User
|
|
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for your quick response.
Is the Continuous View the same as Tabular View? If not, how to create the continuous view?
Thanks again,
LX
Quote:
quote:Originally posted by Steven
You can't add things to datasheet views.
If you need to, you'll have to settle for making your form look similar to datasheet view by making it in Continuous view.
Either that, or make it a subform of a larger Single form and add the buttons to the main form.
I am a loud man with a very large hat. This means I am in charge
|
|
|

March 8th, 2004, 05:20 PM
|
|
Authorized User
|
|
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I found the answer. Thanks again.
LX
Quote:
quote:Originally posted by lxu
Thanks for your quick response.
Is the Continuous View the same as Tabular View? If not, how to create the continuous view?
Thanks again,
LX
Quote:
quote:Originally posted by Steven
You can't add things to datasheet views.
If you need to, you'll have to settle for making your form look similar to datasheet view by making it in Continuous view.
Either that, or make it a subform of a larger Single form and add the buttons to the main form.
I am a loud man with a very large hat. This means I am in charge
|
|
|
|

March 8th, 2004, 06:05 PM
|
|
Authorized User
|
|
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can paste this code in your on Open Event Procedure:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_OpenoForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Your form name"
DoCmd.OpenForm stDocName, acFormDS
Exit_OpenoForm_Click:
Exit Sub
Err_OpenoForm_Click:
MsgBox Err.DESCRIPTION
Resume Exit_OpenoForm_Click
End Sub
OR you can paste it in a command button. The key is the form's name and "acFormDS" the view type.
In matters of style, swim with the current. In matters of principle, stand like a rock. Thomas Jefferson
-------\\\|///
--------(oo)
--oOOo-(_)-oOOo--
|
|

March 8th, 2004, 06:19 PM
|
|
Authorized User
|
|
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It's interesting. I'll try.
Thanks,
LX
Quote:
quote:Originally posted by bhunter
You can paste this code in your on Open Event Procedure:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_OpenoForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Your form name"
DoCmd.OpenForm stDocName, acFormDS
Exit_OpenoForm_Click:
Exit Sub
Err_OpenoForm_Click:
MsgBox Err.DESCRIPTION
Resume Exit_OpenoForm_Click
End Sub
OR you can paste it in a command button. The key is the form's name and "acFormDS" the view type.
In matters of style, swim with the current. In matters of principle, stand like a rock. Thomas Jefferson
-------\\\|///
--------(oo)
--oOOo-(_)-oOOo--
|
|
|
 |