Trying to get filtered Report based on form combo box

I submitted a question about making a form and combo box act like a parameter 
query a couple of weeks ago.  Someone gave me some help but I still can't get 
it to work.

The combo box is linked to the proper list but when I run the report I am 
having two problems.

1.  THe report is not being filtered like I want.
2.  I can't get it to preview, it keeps trying to print.

Here is the code I have (minus all of the variations I have tried):

On Error GoTo Err_CmdRunRpt_Click

    DoCmd.OpenReport "RptProgramInventory", , , "[ModelNo] = '" & 
Me.ProgramCombo & "'"

Exit_CmdRunRpt_Click:
    Exit Sub

Err_CmdRunRpt_Click:
    MsgBox Err.Description
    Resume Exit_CmdRunRpt_Click
    
End Sub

Any suggestions would be greatly appreciated!

Thanks!
0
Utf
10/25/2007 12:33:01 PM
access 16762 articles. 3 followers. Follow

1 Replies
916 Views

Similar Articles

[PageSpeed] 50

Have you set a breakpoint and looked the value returned by your combo?
Don't forget, it will return the bound column (not necessarily the one you 
see on screen).

To open the report in preview mode try this:
DoCmd.OpenReport "RptProgramInventory", acViewPreview, , "[ModelNo] = '" & 
Me.ProgramCombo & "'"

Steve

"ShannaD" wrote:

> I submitted a question about making a form and combo box act like a parameter 
> query a couple of weeks ago.  Someone gave me some help but I still can't get 
> it to work.
> 
> The combo box is linked to the proper list but when I run the report I am 
> having two problems.
> 
> 1.  THe report is not being filtered like I want.
> 2.  I can't get it to preview, it keeps trying to print.
> 
> Here is the code I have (minus all of the variations I have tried):
> 
> On Error GoTo Err_CmdRunRpt_Click
> 
>     DoCmd.OpenReport "RptProgramInventory", , , "[ModelNo] = '" & 
> Me.ProgramCombo & "'"
> 
> Exit_CmdRunRpt_Click:
>     Exit Sub
> 
> Err_CmdRunRpt_Click:
>     MsgBox Err.Description
>     Resume Exit_CmdRunRpt_Click
>     
> End Sub
> 
> Any suggestions would be greatly appreciated!
> 
> Thanks!
0
Utf
10/25/2007 4:54:01 PM
Reply:

Similar Artilces:

Questions on emailing access reports in a snp and PFD format & FAX
I am in the process of developing an application which is to send ACCESS reports to suppliers (Monthly Supplier Performance Report cards). I am using the VBA code from the references which I was directed to, from this forum. I use the Stephan Labans code to convert the ACCESS report to a PDF format. I send a MS Outlook message with 2 attachments (a snapshot {snp} and PDF version of the report). Currently the code works if I close the open PDF version of the report before the code increments to the next supplier (next recordset record). If I do not manually close the displayed PDF...

Form not populating
Hello all... I have a edit record form, which was working, until I added record navigation buttons to the form (memberinfo) that has the edit record button that opens it. I'm not sure where the problem is, but the eidt record form no longer populates the information. The filter shows the correct info, but the text boxes are all blank. Here is the code for the edit record button on the memberinfo form. -------------------------- Dim stDocName As String Dim stLinkCriteria As String stDocName = "EditMemberInfo" stLinkCriteria = "[MembershipNumber]=...

Getting a subform control to requery
Main Form : F_BU Subform1: F_BU_Cat2 SubForm2: F_BU_Cat3 When I click on one of the records in subform1 (field BillCat) the OnClick event uses the value in the field as a criteria in a query that is used in the combox (cbxCat3) in Subform 2. Here is the code I was trying to use: Me.Parent!F_BU_Cat3.Form!cbxCat3.Requery It was working for a while but now not when I click on the "BillCat" field in Subform 1 I get: Method: Form" of Object ' _Subform' Failed. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-form...

Continuous Form Use
I created a form similar to an Access form. It's for logging in phone calls and messages. Is there a way to set it up like in Access where a single form appears on 1 page but can generate subsequent pages within the file? Or is setting it up as a table the only way it can be done? Our IT contractor doesn't want me to use Access otherwise this would be a breeze. Any suggestions or help is appreciated. Thanks. You can spawn forms off a form, and access the data on that form. -- HTH RP (remove nothere from the email address if mailing direct) "ryjack" <ryjack@disc...

We are getting stat=Deferred: Connection reset errors .....
Does anyone know how to fix this issue? I am getting a lot of emails BUT an Exchange admin from another company that sends SMTP email to is saying that he sees a lot of stat=Deferred: Connection reset error messages in his log file. very very weird. Has anyone seen this issue? He can telnet to the server fine etc... plus I am getting email from his company but it is deferring aa ton though. Thanks What version of Exchange and SP level Oliver Exchange 5.5 SP 4 is our IMS. "Oliver Moazzezi" wrote: > What version of Exchange and SP level > > Oliver > >...

Cascading Combo for Chart Source
I have found some examples of how to use a combo to set the data source of an excel chart (see http://peltiertech.com/Excel/Charts/ChartByControl.html), using a combo to set an offset. In this case I'd have a combo box of counties which return number which is used as the offset. The relevant row is then used as the source for the chart. COUNTY WEEK01 WEEK02 WEEK03 WEEK04 Staffordshire 1.1 1.2 1.4 2.1 Derbysire 2.1 3.3 4.1 2.2 .... However, I have another spreadsheet that has the monitoring stations within counties. There are hundreds so it wouldn'...

Letter Writing Assistant selection based on Smart List Lookup
We had a great opportunity to use the letter writing assistance to send out a notice to any vendor used within the last 6 months. Using the smartlist lookup up we can see those vendors we have issued a check to based on Last Check date, but the Letter Writing Assistant only allows you to select ranges. ---------------- 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 ...

Filters
Hi I have a spreadsheet that contains many cols of which one displays dates. I very often had to select entries by date, so I apply the filter and select the require date, and then copy the results to another sheet to work on I would like a macro that would automate the entire procress Load the file, apply the filter and then copy the reults to another worksheet. I am stuck on how to pause the macro to input the the required date- which varies quite a bit. Will any one help please Thanks ...

Round corners on a box
How do I round corners in a box that I have filled with a colour. Use the autoshapes, it has a rounded square... -- Mary Sauer MS MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "nikon tony" <nikon tony@discussions.microsoft.com> wrote in message news:DB6B467D-21ED-4516-A324-E3274A6F80C7@microsoft.com... > How do I round corners in a box that I have filled with a colour. Hi Mary, Many thanks for the reply, it hass been 100% useful. I could not for the life of me find that. Thank you. Tomy "Mary Sauer" wrote: > ...

can I get "step by step" on color seperating for commercial printi
This is kind of an extension on my previous message but I feel it would help a lot more. Can someone give me a quick step by step on making a document with text and photo into a press quality color seperated piece using PMS colors and process black? Or maybe point me to a site that can give step by step on that stuff? ...

Budgets - Bills - Reports
Summary: I have a recurring bill that appears in my budget in the correct category – with the monthly expense of $9.95 and M07 shows that it has budgeted $9.95 to pay for that bill. When I look at that category in several reports, the reports show that I have $0 set aside for that category, and that I am overspent in that category by $9.95. Can anyone help explain how/why budgets and bills seem to have a relationship, but this relationship does not carry over into the actual reports? The Details: I have typed in all of my bills into the bills section. For simplicity, I will only tal...

Report by Sales Rep
RMS should have a report that lets you see the items a sales rep has sold for a given time period. Or does that already exist and I can't find it? Thanks, Nick https://mbs.microsoft.com/downloads/customer/Custom_Detailed_Sales_by_Sales_Rep.zip Rob <nick@realkiteboarding.com> wrote in message news:FNf4e.4650$Kx5.1158@fe03.lga... > RMS should have a report that lets you see the items a sales rep has sold > for a given time period. > > Or does that already exist and I can't find it? > > Thanks, > Nick > Thanks Rob "Rob" <rob@retail...

Where can we get xml scheme for tuning setting of WM2003/WM5.0 PDA
Hi all, We are working upon setting up a lot of WM2003/WM5.0 empowered mobile devices according with company standards. As far as I know these settings are tuned through xml file. Then this xml file has to be deployed deployed/executed onto mobile device. My question is where xml scheme for tuning such setting is published so we may assign necessary properties referencing it? Thank you in advance. ...

Print button on Report form
Hi all :-) =20 Access 2007 Pro Plus, Vista Ultimate SP2 I am preparing a small app for a friend who is handicapped, and am = trying to make things as simple as possible for them to use. I am trying = to limit the number of functions and clicks necessary to accomplish = tasks as much as possible, and would like to try an idea. I want to add a small button on the report form that will print the = report when clicked. I have done this on display forms to print as a = report, but, not on a report form. In trying to add such a button to the = report form in 2007 I am not being offered...

User Access Reporting
Hello Everybody, Does anyone know of a better way to audit security for individual users that the User Security report? Even with the options set to include Accessible Items only, we're finding the report for a single user runs well over 100 pages. With that kind of bulk, both the generation and review of the reports becomes a major endeavor. We're currently using GP9, with plans to go to 10 this year. Thanks, Jeremy Hi Jeremy Have you looked at the Rockton Software add-on called Security Auditor? I think it will do everything you are looking for and more. -- Fliehigh &q...

Error created when try to Print Preview or Print
When try to print or print preview system is generating an error: "Print titles must be contiguous and complete rows or columns." Used excel for years ever seen this error before. Using Excel 2007 on Vista, we just upgraded to SP2 for both systems. After testing a few times, I notice that system is generating a Name Range with no referencing cell range, the name range is called Print_Titles. If I delete the name range it removes the error message and able to use print preview and able to print. Notice it is occurring more ofter when client is copying a worksheet to ...

how to insert chart for imported data in a report?
plz reply soon if you know Please use the large white space under the subject to enter a detailed question. It also helps to read some past threads that might pertain to your question (whatever it is). -- Duane Hookom Microsoft Access MVP "varsha from pilibhit" wrote: > plz reply soon if you know ...

How to get Global Notification of browser request...
Hye, I am trying to get notification of any browser request... (not only that of the local server.. so filters will not be the right way to solve problem) So, whenever any request like (http://www.yahoo.com/) is made in IE, I want my DLL routine or my EXE should be called.. So, how to do that, any suggestion will be highly appreciated... -- Jigar Mehta jbmehtain@yahoo.co.in the program you need is called Browser Helper Objects http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp -- Command what is yours Conquer what is not Microsoft Most Valuable Professional [VC++] h...

Money Reports #3
I was wondering if anyone could tell me why MS Money counts credit card payments from my checking account as income?? Does anyone know how I can fix the problem? Thanks In microsoft.public.money, jagpit wrote: >I was wondering if anyone could tell me why MS Money counts credit card >payments from my checking account as income?? Does anyone know how I >can fix the problem? Use a single Transfer transaction from bottom of the list under SPECIAL. This assumes you are using "Advanced" register setting. "jagpit" <fbbc83@yahoo.com> wrote in message news:11...

Filters #3
In Excel 2000, I have a spreadsheet that the filter worked fine. I used it for a lot of "contains" filtering. It now appears that since I've added additional text to some cells, when I do a filter, I'm not seeing all the unique values in the drop down filter list. I've checked the area selected and this is fine. Any recommendations? Hi Katie There is a limit http://www.contextures.com/xlautofilter02.html#Limits You can use EasyFilter maybe (No problem there) http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Kat...

User forms #4
Rather than linking excel to a VB front end, how powerful are the VB userforms? If I want to create a front end of my excel workbook with sheets which will just display information that the cells calculate th how hard would this be? I also want to try and hide the fact that it is an excel spreadsheet? Thanks in advance Padrai -- Message posted from http://www.ExcelForum.com Shouldn't be too hard, especially if you know VB! To hide the fact the file is in excel you can do things such as hidin worksheets and also hiding toolbars when the worbook_open event i triggered. This can al...

Money is trying to change my Internet Explorer Security settings.
Every time I use MS Money Deluxe 2007 it tries to change my Internet Explorer Security settings. What is it trying to change specifically and how can I stop it permanently from doing that? -- Howard ...

Excel 2000 tries to open unrecognizable file on startup
Hi, For the last couple of weeks, when I first open Excel I get a Microsoft Excel Error pop-up window that says "This file is not in a recognizable format....". I am uncertain what file it is trying to open, but when I click "cancel" it opens books1.xls. Which I usually ignore and go into "open file" and pick my excel file. Any idea what is going on? Win98 Excel 2000 -- Thanks - Jeff Jeff I suspect one of two things 1) Excel opens all files in it xlStart folder. Search for this and remove anything without an .xls, xlt extension 2) If you go to Tools&g...

Emails getting stuck in Outbox
Hi I am sending a number of emails (around 600) using the vb.net code below. The problem is that the emails end up in the OL2007 Outbox with a clock icon and do not go out. If I open one of the email items and click Send then that item goes out but this technique is too cumbersome for 600 or so emails. What is the problem and how can I fix it? Many Thanks Regards Dim objOutlook As Object = CreateObject("Outlook.Application") Dim NS As Object = objOutlook.GetNamespace("MAPI") Dim objOutlookMsg As Object Dim BodyText As String ...

Test linked form for data
Hi Groupies How can I test to see if a linked form, that might not be visible, has data? My main form has a yes/no box that enables a button when it is set to yes. The button opens a linked form. When the user moves to the next record, I would like the main forms BeforeUpdate event to make sure that the yes/no box is not set at No while there is data in the linked form for that record. I have tried something like: If Me.Form.frmVehicles.RecordsetClone.RecordCount > 0 And Me.CompanyVehicle = False Then Cancel = True MsgBox "Please check vehicles", vbOKOnly Me.f...