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
0
Utf
3/24/2010 8:29:02 PM
access.forms 6864 articles. 1 followers. Follow

3 Replies
3344 Views

Similar Articles

[PageSpeed] 32

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" <Bretona10@discussions.microsoft.com> wrote in message 
news:59EE209A-3834-471C-8B3B-41726F9DB5E0@microsoft.com...
>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 


0
Al
3/24/2010 10:01:57 PM
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
0
fredg
3/24/2010 10:04:47 PM
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" <Bretona10@discussions.microsoft.com> wrote in message 
news:59EE209A-3834-471C-8B3B-41726F9DB5E0@microsoft.com...
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 

0
Gina
3/24/2010 10:17:28 PM
Reply:

Similar Artilces:

How do I put input boxes and sumbit buttons in?
How do I put input boxes and sumbit buttons in excel vba? I am trying to make a address book manually using Excel VBA. Is there a way I can record multiple information into Excel after submitting info. All i have so far is being able to submit one bit of information into excel but I dont think it will stay if I save it. Like is there a way I can group multiple address information using excel VBA? If so how? What you want to do is not clear. Please post back and give us a step-by-step procedure of what you want to do and what you want Excel to do. HTH Otto "mikstr14" <m...

print preview command in Excel
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I just upgraded to office 2008 for Mac and can not find the &quot;print preview&quot; command in Excel I had in my previous version and that is available in Word 2008. Was it removed? > On 11/4/09 8:43 AM, in article 59b7feef.-1@webcrossing.caR9absDaxw, <br> > &quot;sprint1005@officeformac.com&quot; wrote: <br> > <br> > > Version: 2008 <br> > > Operating System: Mac OS X 10.6 (Snow Leopard) <br> > > <br> > > I just upgraded to office ...

macros will not assign to buttons
Help! I cannot assign macros to my custom buttons. The dialog box appears and I can select a macro but it does not save to the button. I believe this is related to another problem I had - which was my personal.xls file did not load on start even though it was in the xl start folder. I fixed that - it was disabled by excel which I fixed by going to about excel - disabled files and selecting enable. Now personal.xls loads - but the macros will not assign. What type of button? From Tools>Customize>Commands>Macros? These customizations are stored in a file named Excel(x).xlb wher...

ESEutil commands
I need a step by step guide on using eseutil. I need to learn how to use this tool to commit the logs to the database On Tue, 23 Nov 2004 18:09:02 -0800, "Ed" <Ed@discussions.microsoft.com> wrote: >I need a step by step guide on using eseutil. I need to learn how to use this >tool to commit the logs to the database eseutil/? A full online backup of the store will commit the logs. What exactly are you trying to accomplish? I have another site that will not have a backup solution in place until next month so i would to know how to flush the logs using this utility ...

Creating custom buttons #2
Hello, I would like to create screens of buttons so that the operators of the register can simply press a button to add an item for a sale. The system will be used at the end of a cafeteria type food line and I need to speed up the check out process. What I am thinking is having 3 buttons on one screen, Hot Food, Drinks, and Candy/Snacks. Then when the cashier presses Hot Food, another screen comes up that displays 1 button for each of the 16 current Hot Food items. When 1 of those items is selected, the Hot Food button screen should remain open until the user presses a Back button. ...

Follow Up View in Office 2003
I recently installed Office 2003 with the Business Contact Manager. In my old version of office when I set a follow up flag the contact would pop up when the follow up arrived, a list of needed follow ups would appear, the text would turn red, and you could view the follow ups and sort them by follow up due date. In MSOffice 2003 none of this happens with business contacts. I can change to a view by "follow up" but all it does in show me all the follow up files and I cannot find out how to show a column that has the follow up DATE and then sort by that date. So anyone kn...

Command Button #4
I'm trying to create a command button to clear filters in my spreadsheet. I don't know how to write the commands, but can recored a macro and run it fine. I tried pasting that macro into the button....and I had it working then messed it up. Now when I click on the button, nothing happens. The code currently associated to the button is below. I really don't want Criteria1 to = 'Reject', but the one time the button worked if no filter was set and the button clicked, an error was returned. The only way I could make it work was to force a filter as part of the macro. How...

Customisation of Avticity View
Hi, I have users that are becoming frustrated with the Activity View not including the Data of the activity. If this was one of the columns, then the list could be sorted in date sequence. Seems a reasonable thing to do (view Activities in the sequence they occured!). I have had a look at the customisation facilities but it doesn't seem to allow for the customisation of 'Activities'. I only get the option to customise Leads, Opportunities, Accounts, Contacts, and Addresses..... seems to be I'm missing Activities? Is there anyway I can customise the Activity View to inc...

command
how do you use command. A lot of computer people use it but how do we use it? Aaron You've reached a newsgroup dedicated to supporting the use of Microsoft Access, a relational database product. I don't see anything in your post that suggests you are asking about MS Access. Please post to a newsgroup that supports the area covered by your post. Regards Jeff Boyce Microsoft Office/Access MVP "aaron" <aaron_t_d@hotmail.com> wrote in message news:78CB1423-55B3-40A1-8BF5-D4615E816057@microsoft.com... > how do you use command. A lot of computer people use i...

Set Increment on Spin Button to 0.1
I'm using a spin button from the control toolbar to increase the value in a cell. the min value i want is 0 the maximum is 2 but i want it to increase by 0.1 in the properties this doesn't seem to be allowed help!!!! Thanx Mark Mark, Here is one way. Link your spinbutton to an unused cell (I use) A15. Set the max to 20. Then in code, set the real cell's value like so Private Sub SpinButton1_SpinUp() Range("A16").Value = Range("A15").Value / 10 End Sub Private Sub SpinButton1_SpinDown() Range("A16").Value = Range("A15").Valu...

BOM View lookup should only list items with BOMs.
The current BOM VIew Inquiry lookup lists every single item in the item master table. This is awkward & unecessary. The list would be shorter and more user friendly if it only listed the items that actually do have BOMs. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message ...

command boxes from menu
I was working on word 2003, I had copied a portion of an online ebook to paste onto a new document, when I did right click to paste it on the doc. the command box appears outlined, no word commands, it's like a ghost. I then went to the menu at the top to Edit and find paste to do it from there and the same thing appeared; an outline of the command box, no word commands, it's like a ghost. I tried to pretend the words were there just not visible and moved my cursor to the position in which I thought paste was and clicked but nothing happened. Has anybody ever had this ...

OleDB and Obtaining a Sorted View
I am doing some self-directed study and am trying to duplicate a sample app written using Visual C++ 6. My development environment is Visual Studio 2008 Pro. I used the App Wizard to build the initial framework for an SDI app with database no file support. I have managed to re-create the app except for one glaring deficiency. The original app, which I let VS2008 convert from the original VC++ 6 code, has a view that opens on the first record and gives every indication it is sorted by the unique identifier. My efforts, however, don't. The table in question has 77 records. When my vie...

command
still learning of the sql command HOW TO DISABLE XP_CMDSHELL AND DISABLE BOTH MAIL PROCEDURES ...

remove button
How can I remove the Save and Close, or Save and New button on a phone call activity? Hi Troy, You could find out the location of the buttons via Javascript and then hide these buttons. Though this is relatively hard to do and unsupported, it can be done. Another approach, which in my opinion is a lot better, would be to remove the rights for users to create, delete and eventually update the entity phone call. You can do this in the security roles in the settings section. Hope this helps, -- Ronald Lemmen - MSCRM MVP Avanade Netherlands http://ronaldlemmen.blogspot.com/ "Troyz...

Adding a command to a picture
I have inserted a picture onto my form and in the Event / double click set up a macro to close the form however when i double click on my picture nothing is happening - help!! On Thu, 3 Jun 2010 06:02:22 -0700, casi <casi@discussions.microsoft.com> wrote: One suggestion would be to temporarily add a button to your form, and from the button wizard select the option to close the form. Then look behind the scenes what was generated, and implement your image_doubleclick the same way. -Tom. Microsoft Access MVP >I have inserted a picture onto my form and in the Event ...

Command Handler
Hi Guys, I have a context menu and menu handler. I know how to acheive what is needed,but I am wanting to know if there is a better way to do this. When the user right clicks on a view, I get the OnRButtonDown(...), there I show the context menu. I have a command handler for the menuitems in the context menu also, clicking which will take me to the handler. What I want is to know is the point where the context menu popped up inside the command handler. Is there a way? Or Is caching the CPoint in OnRButtonDown and using it in the command handler the only way? Thanks Vipin &...

Make lines on a graph appear with a button
All, I need to create a graph with 40 or so lines graphed but only one up o the graph at a time with the use of buttons. I would really appreciat a hand, I am very new to this level of Excel. Thanks -- Message posted from http://www.ExcelForum.com Select all the data, and create a line chart Select a cell in the table Choose Data>Filter>AutoFilter From the dropdown list in one of the heading cells, select an item The chart will display the data for that item geistritter < wrote: > I need to create a graph with 40 or so lines graphed but only one up on > the graph at a tim...

project hierarchy lost with new view
So I created a view with a filter that would only display tasks that were marked as milestones for the project. The problem is that when I go to this view in PWA it displays the proper tasks, but no hierarchy is displayed. I want it to display with the same sort of view that you see on the "Tasks Summary" view. How do I create the view with the proper hierarchy displayed? Robert -- If you examine the setup of the Tasks Summary view, you will see that the View includes the ID field and sorting is then applied on that field. If you include the ID field in your cust...

Userform Command Button
In a Userform, I have multiple command buttons. For example: D1_Click D2_Click Depending on another event that occurs, I want to calculate in code the button name that I will be triggering the click event and then trigger the event. For example Application.Run "D" & i & "_Click" with i being the value of 1 or 2. Application.Run doesn't appear to work in the Userform. Thanks Steve Maybe it's because most subroutines in a userform module are "Private"??? Have you tried changing the "Private" prefix to "...

Sales for outlook folders and buttons.
ok, so I've done this many, many times.... .. Go to Tools | Options. 2. Click on the Other tab and click on the Advanced Options button. 3. Click on the COM Add-Ins button. 4. Highlight the Microsoft CRM Add-In (Note the location of the crmaddin.dll) and then click the remove button. 5. Click OK until back at the Outlook window. 6. Exit Outlook. 7. Launch Outlook and go back to the COM Add-Ins window (steps 1 - 3). 8. Click the Add button and navigate to the location of the crmaddin.dll file (from Step 4). 9. Click OK to get back to the Outlook Window. 10. Exit Outlook and...

Print withoutshowing a comand button
I am trying to print a spreadsheet but I do not want the comand button show on the paper copy. Is there a way to hide it in the printing process. les, view, toolbars, control toolbox, click on the design mode button then right click on the button and properties, there is an option there for print object, change to false, click on design mode again and close the tool bar -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "les&quo...

command buttons
Greetings, I have two command buttons A and B which are connected to subforms on the main form.I have a table"Client" and field "A/B". My goal is when I click amdA I want the field "A/B" show A, whe I click cmdB I field "A/B" will show B. If any solution? For me it's puzzle.Thx. -- Patric Patric, Assuming that the control you want to populate on the main form is named 'A/B', put the following code in the On Click event for button A: Forms![Name of main form]![Name of sub form control].Form![A/B] = A In the On Click event for button B:...

Dynamic Button Name?
Hi everone, Can a button name be made dynamic? For example, you create a button and want its name be read from cell A1. So if A1 read "Mike", the button name automatically become "Mike" and so on. Thanks, Mike for a button from the Forms toolbar, you can use this event macro. Put it in the worksheet code module (right-click the worksheet tab and choose View Code") Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not Intersect(Target, Range("A1")) Is Nothing Then _ Me.Buttons(1).Caption = Range("A1").Value ...

run command to istall printers?
I have the following commands that I can type at the dos prompt that will install a printer into all users profiles on the computer. rundll32 printui.dll,PrintUIEntry /ga /n=94\\prnsrv\Second Floor Printer=94 net stop spooler net start spooler How can I put this into a vbs script so that I use it to run on peoples computers rather than typing it in. Thanks. Steve wrote: I have the following commands that I can type at the dos prompt that will install a printer into all users profiles on the computer. rundll32 printui.dll,PrintUIEntry /ga /n�\\prnsrv\Second Floor ...