Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 8th, 2004, 04:06 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old March 8th, 2004, 04:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
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
Reply With Quote
  #3 (permalink)  
Old March 8th, 2004, 05:08 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Location: , , .
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
Reply With Quote
  #4 (permalink)  
Old March 8th, 2004, 05:20 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Location: , , .
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
Reply With Quote
  #5 (permalink)  
Old March 8th, 2004, 06:05 PM
Authorized User
 
Join Date: Feb 2004
Location: Edwards AFB, California, USA.
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--
Reply With Quote
  #6 (permalink)  
Old March 8th, 2004, 06:19 PM
lxu lxu is offline
Authorized User
 
Join Date: Oct 2003
Location: , , .
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--
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:48 PM.


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