A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Command Button with datasheet view



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2010, 09:29 PM posted to microsoft.public.access.forms
Bretona10
external usenet poster
 
Posts: 12
Default Command Button with datasheet view

I have a form with a subform, both default to datasheet views. I want to put
a Print Preview button on the form, but it doesnt show up in the datasheet
view.

Is there a way to do this?

Thanks,
Bret
  #2  
Old March 24th, 2010, 11:01 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Command Button with datasheet view

Bretona10,
You can create a continuous form that "looks" just like a
datasheet view, but can have button/s in the header/footer.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"Bretona10" wrote in message
...
I have a form with a subform, both default to datasheet views. I want to
put
a Print Preview button on the form, but it doesnt show up in the datasheet
view.

Is there a way to do this?

Thanks,
Bret



  #3  
Old March 24th, 2010, 11:04 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Command Button with datasheet view

On Wed, 24 Mar 2010 13:29:02 -0700, Bretona10 wrote:

I have a form with a subform, both default to datasheet views. I want to put
a Print Preview button on the form, but it doesnt show up in the datasheet
view.

Is there a way to do this?

Thanks,
Bret


Forms are not designed for printing. Reports are.
Create a report that displays the data the way you want it to.
Then open the report from the command button on your form.
DoCmd.OpenReport "ReportName", acPreview
will display all the records.

If you wish to just report on the one record displayed on the form,
add a where clause to the above OpenReport code.

Assuming the Unique Field is a Number datatype, then:
DoCmd.OpenReport "ReportName", acPreview , , "[RecordID] = " &
Me.[RecordID]

However, if the Unique Field is a Text datatype, use:
DoCmd.OpenReport "ReportName", acPreview , , "[RecordID] = '" &
Me.[RecordID] & "'"


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #4  
Old March 24th, 2010, 11:17 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Command Button with datasheet view

Bretona10,

That would be one of the pitfalls of using datasheet view. Perhaps creating
a form that *loks like* datasheet view, then you could use a button.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bretona10" wrote in message
...
I have a form with a subform, both default to datasheet views. I want to put
a Print Preview button on the form, but it doesnt show up in the datasheet
view.

Is there a way to do this?

Thanks,
Bret

 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.