Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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
 
Old March 8th, 2004, 04:06 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old March 8th, 2004, 04:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old March 8th, 2004, 05:08 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old March 8th, 2004, 05:20 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old March 8th, 2004, 06:05 PM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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--
 
Old March 8th, 2004, 06:19 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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--





Similar Threads
Thread Thread Starter Forum Replies Last Post
reading a dataset into a form in datasheet view jd_erd Access 2 January 29th, 2007 04:26 PM
Datasheet view of a Query - Field Format arfa Access 4 March 13th, 2006 12:34 PM
Datasheet View - Customize Dataman Access 0 February 16th, 2004 02:07 PM
Datasheet View Auto Highlight a Row Dataman Access VBA 0 February 15th, 2004 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.