Filter a Report with a Form

I am struggling a bit of code that dynamically filters elements in a report. 
I have a form with the following objects: lstCustomer, lstExecBroker, an 
Option Group named ‘fraTrader’, with three radio buttons; optOption for 
'Option', optCross for 'Cross', and optBoth for 'Stock'. Also, I have 
cboSortOrder1, cboSortOrder2, and cboSortOrder3 as well as cboSortOrder1, 
cboSortOrder2, and cboSortOrder3, all of which control sort order. Finally, 
here’s the code:

Private Sub cmdApplyFilter_Click()
Dim varItem As Variant
Dim strCustomer As String
Dim strExecBroker As String
Dim strTrade As String
Dim strFilter As String
Dim strSortOrder As String

DoCmd.OpenReport "Options", acViewPreview

For Each varItem In Me.lstCustomer.ItemsSelected
strCustomer = strCustomer & ",'" & Me.lstCustomer.ItemData(varItem) _
& "'"
Next varItem
If Len(strCustomer) = 0 Then
strCustomer = "Like '*'"
Else
strCustomer = Right(strCustomer, Len(strCustomer) - 1)
strCustomer = "IN(" & strCustomer & ")"
End If

For Each varItem In Me.lstExecBroker.ItemsSelected
strExecBroker = strExecBroker & ",'" &
Me.lstExecBroker.ItemData(varItem) _
& "'"
Next varItem
If Len(strExecBroker) = 0 Then
strExecBroker = "Like '*'"
Else
strExecBroker = Right(strExecBroker, Len(strExecBroker) - 1)
strExecBroker = "IN(" & strExecBroker & ")"
End If

Select Case Me.fraTrader.Value
Case 1
strTrade = "=Option"
Case 2
strTrade = "=Cross"
Case 3
strTrade = "=Stock"
End Select

strFilter = "[CustName] " & strCustomer & _
" AND [ExecBroker] " & strExecBroker & _
" AND [TradeType] " & strTrade

If Me.cboSortOrder1.Value <> "Not Sorted" Then
strSortOrder = "[" & Me.cboSortOrder1.Value & "]"
If Me.cmdSortDirection1.Caption = "Descending" Then
strSortOrder = strSortOrder & " DESC"
End If
If Me.cboSortOrder2.Value <> "Not Sorted" Then
strSortOrder = strSortOrder & ",[" & Me.cboSortOrder2.Value & "]"
If Me.cmdSortDirection2.Caption = "Descending" Then
strSortOrder = strSortOrder & " DESC"
End If
If Me.cboSortOrder3.Value <> "Not Sorted" Then
strSortOrder = strSortOrder & ",[" & Me.cboSortOrder3.Value
& "]"
If Me.cmdSortDirection3.Caption = "Descending" Then
strSortOrder = strSortOrder & " DESC"
End If
End If
End If
End If

With Reports![Options]
..Filter = strFilter
..FilterOn = True
..OrderBy = strSortOrder
..OrderByOn = True
End With

End Sub

If I comment that out this section:
Select Case Me.fraTrader.Value
Case 1
strTrade = "=Option"
Case 2
strTrade = "=Cross"
Case 3
strTrade = "=Stock"
End Select

As well as this:
" AND [TradeType] " & strTrade

I can filter the elements and the report works the way I want it to. For
some reason, this is wrong:
Select Case Me.fraTrader.Value
.. . .
End Select

That converts the data to the wrong type, I suspect. Anyway, with that 
section un-commented out, when I click ‘Apply Filter’ on the form, I am 
prompted for a parameter ‘Option’, ‘Cross’, or ‘Stock’, whichever I choose 
from the form, and then the report opens, and ALL ELEMENTS are filtered out – 
nothing shows in the report.  Also, the report doesn’t get filtered correctly 
because of this part.  How can I resolve this?

Thanks!
Ryan--


-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
0
Utf
12/19/2009 12:26:01 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

2 Replies
820 Views

Similar Articles

[PageSpeed] 56

If TradeType is a Text field, you need to compare its value to a string:

Select Case Me.fraTrader.Value
  Case 1
    strTrade = "='Option'"
  Case 2
    strTrade = "='Cross'"
  Case 3
    strTrade = "='Stock'"
End Select

(in case you can't see them, I've added single quotes on either side of the 
values)

If TradeType is a numeric field, you need to compare its value to a number, 
not a word.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"ryguy7272" <ryguy7272@discussions.microsoft.com> wrote in message 
news:DBE8C585-76B1-4DA7-B45A-12F346286C10@microsoft.com...
>I am struggling a bit of code that dynamically filters elements in a 
>report.
> I have a form with the following objects: lstCustomer, lstExecBroker, an
> Option Group named ‘fraTrader’, with three radio buttons; optOption for
> 'Option', optCross for 'Cross', and optBoth for 'Stock'. Also, I have
> cboSortOrder1, cboSortOrder2, and cboSortOrder3 as well as cboSortOrder1,
> cboSortOrder2, and cboSortOrder3, all of which control sort order. 
> Finally,
> here’s the code:
>
> Private Sub cmdApplyFilter_Click()
> Dim varItem As Variant
> Dim strCustomer As String
> Dim strExecBroker As String
> Dim strTrade As String
> Dim strFilter As String
> Dim strSortOrder As String
>
> DoCmd.OpenReport "Options", acViewPreview
>
> For Each varItem In Me.lstCustomer.ItemsSelected
> strCustomer = strCustomer & ",'" & Me.lstCustomer.ItemData(varItem) _
> & "'"
> Next varItem
> If Len(strCustomer) = 0 Then
> strCustomer = "Like '*'"
> Else
> strCustomer = Right(strCustomer, Len(strCustomer) - 1)
> strCustomer = "IN(" & strCustomer & ")"
> End If
>
> For Each varItem In Me.lstExecBroker.ItemsSelected
> strExecBroker = strExecBroker & ",'" &
> Me.lstExecBroker.ItemData(varItem) _
> & "'"
> Next varItem
> If Len(strExecBroker) = 0 Then
> strExecBroker = "Like '*'"
> Else
> strExecBroker = Right(strExecBroker, Len(strExecBroker) - 1)
> strExecBroker = "IN(" & strExecBroker & ")"
> End If
>
> Select Case Me.fraTrader.Value
> Case 1
> strTrade = "=Option"
> Case 2
> strTrade = "=Cross"
> Case 3
> strTrade = "=Stock"
> End Select
>
> strFilter = "[CustName] " & strCustomer & _
> " AND [ExecBroker] " & strExecBroker & _
> " AND [TradeType] " & strTrade
>
> If Me.cboSortOrder1.Value <> "Not Sorted" Then
> strSortOrder = "[" & Me.cboSortOrder1.Value & "]"
> If Me.cmdSortDirection1.Caption = "Descending" Then
> strSortOrder = strSortOrder & " DESC"
> End If
> If Me.cboSortOrder2.Value <> "Not Sorted" Then
> strSortOrder = strSortOrder & ",[" & Me.cboSortOrder2.Value & "]"
> If Me.cmdSortDirection2.Caption = "Descending" Then
> strSortOrder = strSortOrder & " DESC"
> End If
> If Me.cboSortOrder3.Value <> "Not Sorted" Then
> strSortOrder = strSortOrder & ",[" & Me.cboSortOrder3.Value
> & "]"
> If Me.cmdSortDirection3.Caption = "Descending" Then
> strSortOrder = strSortOrder & " DESC"
> End If
> End If
> End If
> End If
>
> With Reports![Options]
> .Filter = strFilter
> .FilterOn = True
> .OrderBy = strSortOrder
> .OrderByOn = True
> End With
>
> End Sub
>
> If I comment that out this section:
> Select Case Me.fraTrader.Value
> Case 1
> strTrade = "=Option"
> Case 2
> strTrade = "=Cross"
> Case 3
> strTrade = "=Stock"
> End Select
>
> As well as this:
> " AND [TradeType] " & strTrade
>
> I can filter the elements and the report works the way I want it to. For
> some reason, this is wrong:
> Select Case Me.fraTrader.Value
> . . .
> End Select
>
> That converts the data to the wrong type, I suspect. Anyway, with that
> section un-commented out, when I click ‘Apply Filter’ on the form, I am
> prompted for a parameter ‘Option’, ‘Cross’, or ‘Stock’, whichever I choose
> from the form, and then the report opens, and ALL ELEMENTS are filtered 
> out –
> nothing shows in the report.  Also, the report doesn’t get filtered 
> correctly
> because of this part.  How can I resolve this?
>
> Thanks!
> Ryan--
>
>
> -- 
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''. 

0
Douglas
12/19/2009 1:13:54 PM
Thanks for the help Douglas!!  That totally makes sense.  As it turns out, 
the code came from here:
http://www.fontstuff.com/access/acctut19.htm#dialog4

I thought I recognized it.  I haven't been to that site in a couple years; 
almost forgot about it.  Anyway, I got it working based on the tips at that 
site.

Thanks for everything!
Ryan--

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Douglas J. Steele" wrote:

> If TradeType is a Text field, you need to compare its value to a string:
> 
> Select Case Me.fraTrader.Value
>   Case 1
>     strTrade = "='Option'"
>   Case 2
>     strTrade = "='Cross'"
>   Case 3
>     strTrade = "='Stock'"
> End Select
> 
> (in case you can't see them, I've added single quotes on either side of the 
> values)
> 
> If TradeType is a numeric field, you need to compare its value to a number, 
> not a word.
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> 
> "ryguy7272" <ryguy7272@discussions.microsoft.com> wrote in message 
> news:DBE8C585-76B1-4DA7-B45A-12F346286C10@microsoft.com...
> >I am struggling a bit of code that dynamically filters elements in a 
> >report.
> > I have a form with the following objects: lstCustomer, lstExecBroker, an
> > Option Group named ‘fraTrader’, with three radio buttons; optOption for
> > 'Option', optCross for 'Cross', and optBoth for 'Stock'. Also, I have
> > cboSortOrder1, cboSortOrder2, and cboSortOrder3 as well as cboSortOrder1,
> > cboSortOrder2, and cboSortOrder3, all of which control sort order. 
> > Finally,
> > here’s the code:
> >
> > Private Sub cmdApplyFilter_Click()
> > Dim varItem As Variant
> > Dim strCustomer As String
> > Dim strExecBroker As String
> > Dim strTrade As String
> > Dim strFilter As String
> > Dim strSortOrder As String
> >
> > DoCmd.OpenReport "Options", acViewPreview
> >
> > For Each varItem In Me.lstCustomer.ItemsSelected
> > strCustomer = strCustomer & ",'" & Me.lstCustomer.ItemData(varItem) _
> > & "'"
> > Next varItem
> > If Len(strCustomer) = 0 Then
> > strCustomer = "Like '*'"
> > Else
> > strCustomer = Right(strCustomer, Len(strCustomer) - 1)
> > strCustomer = "IN(" & strCustomer & ")"
> > End If
> >
> > For Each varItem In Me.lstExecBroker.ItemsSelected
> > strExecBroker = strExecBroker & ",'" &
> > Me.lstExecBroker.ItemData(varItem) _
> > & "'"
> > Next varItem
> > If Len(strExecBroker) = 0 Then
> > strExecBroker = "Like '*'"
> > Else
> > strExecBroker = Right(strExecBroker, Len(strExecBroker) - 1)
> > strExecBroker = "IN(" & strExecBroker & ")"
> > End If
> >
> > Select Case Me.fraTrader.Value
> > Case 1
> > strTrade = "=Option"
> > Case 2
> > strTrade = "=Cross"
> > Case 3
> > strTrade = "=Stock"
> > End Select
> >
> > strFilter = "[CustName] " & strCustomer & _
> > " AND [ExecBroker] " & strExecBroker & _
> > " AND [TradeType] " & strTrade
> >
> > If Me.cboSortOrder1.Value <> "Not Sorted" Then
> > strSortOrder = "[" & Me.cboSortOrder1.Value & "]"
> > If Me.cmdSortDirection1.Caption = "Descending" Then
> > strSortOrder = strSortOrder & " DESC"
> > End If
> > If Me.cboSortOrder2.Value <> "Not Sorted" Then
> > strSortOrder = strSortOrder & ",[" & Me.cboSortOrder2.Value & "]"
> > If Me.cmdSortDirection2.Caption = "Descending" Then
> > strSortOrder = strSortOrder & " DESC"
> > End If
> > If Me.cboSortOrder3.Value <> "Not Sorted" Then
> > strSortOrder = strSortOrder & ",[" & Me.cboSortOrder3.Value
> > & "]"
> > If Me.cmdSortDirection3.Caption = "Descending" Then
> > strSortOrder = strSortOrder & " DESC"
> > End If
> > End If
> > End If
> > End If
> >
> > With Reports![Options]
> > .Filter = strFilter
> > .FilterOn = True
> > .OrderBy = strSortOrder
> > .OrderByOn = True
> > End With
> >
> > End Sub
> >
> > If I comment that out this section:
> > Select Case Me.fraTrader.Value
> > Case 1
> > strTrade = "=Option"
> > Case 2
> > strTrade = "=Cross"
> > Case 3
> > strTrade = "=Stock"
> > End Select
> >
> > As well as this:
> > " AND [TradeType] " & strTrade
> >
> > I can filter the elements and the report works the way I want it to. For
> > some reason, this is wrong:
> > Select Case Me.fraTrader.Value
> > . . .
> > End Select
> >
> > That converts the data to the wrong type, I suspect. Anyway, with that
> > section un-commented out, when I click ‘Apply Filter’ on the form, I am
> > prompted for a parameter ‘Option’, ‘Cross’, or ‘Stock’, whichever I choose
> > from the form, and then the report opens, and ALL ELEMENTS are filtered 
> > out –
> > nothing shows in the report.  Also, the report doesn’t get filtered 
> > correctly
> > because of this part.  How can I resolve this?
> >
> > Thanks!
> > Ryan--
> >
> >
> > -- 
> > Ryan---
> > If this information was helpful, please indicate this by clicking ''Yes''. 
> 
> .
> 
0
Utf
12/19/2009 6:23:01 PM
Reply:

Similar Artilces:

Filters *SOS* Filters *SOS* Filters *SOS*
1) On formLoad, I need to show only those items which are unassigned. 2) I need for the end-under to select only the items they are assigned to. 3) I need an option to select "ALL" so I can view all items. Any insight offered would be appreciated!!! On Wed, 29 Aug 2007 16:24:01 -0700, valdaiway <valdaiway@discussions.microsoft.com> wrote: >1) On formLoad, I need to show only those items which are unassigned. Use a query to put a criterion on the field that defines the assigned status. I assume you know how that information is stored in your table; nobody here does, ...

Crystal Reports 05-12-04
I'm having an issue where every few weeks the default reports need to be republished. I've got the Crystal Reports toolkit and am able to get the reports working again by republishing them. It's just aggrivating! Has anyone else seen this issue? >-----Original Message----- >I'm having an issue where every few weeks the default >reports need to be republished. I've got the Crystal >Reports toolkit and am able to get the reports working >again by republishing them. It's just aggrivating! Has >anyone else seen this issue? >. > It seems th...

Adding costs for parent item on the BOM with Standard costs report
I want to add the following cost for the parent item on the BOM with Standard costs report: Material cost Material fixed OH cost Labor cost Labor fixed OH cost How can I add the above on the report? Does anyone have information about adding the above fields on the report? Thanks, ...

Merging Reports
I hope someone can help me out... I'm looking to create a single report that will essentially merge the results from the following RMS reports: Items - Inventory Movement Report Items - Item Quantity List I want to see items that have had movement (either received or sold) during the past season OR are still on hand from previous seasons. Currently I have to generate two separate reports, export them to excel, and then manually sort them and remove duplicate information. Thanks in advance to anyone who can help! Jeff, I appreciate the help that is exactly what I am looking for! ...

Criteria for Advanced Filter HELP
I have what I think is a simple question that I need answered IMMEDIATELY. I have a spreadsheet with 20 fields and I want to filter it so it only shows records that have something in of any of 5 of those fields. So once filtered, I will not have any records that have all 5 of those fields blank. I know I have done this before but I'll be damned if I can remember or find out how. -- Thanks You all are teaching me so much don't cross-post -- answer supplied in misc NG "knowshowrosegrows" <knowshowrosegrows@discussions.microsoft.com> wrote in message news:ACBC0...

Employee Filters
Hello: On the employee filters in the HR Preferenes window, would this restrict seeing employee information in both Payroll and HR? Also, would it restrict reporting on certain employees in a division or department? Thanks! childofthe1980s Your message does not indicate which version of Great Plains you are using. Using 8.0 with SP3 applied, HR filters do apply to some of employee information outside of HR. The settings will filter selected forms, Smartlists and Lists items. The HR filter setting do not apply to reports outside of HR. The filtered forms are: Employee Maintenance,...

Filtering based on a filter
Hello, I have an Excel Worksheet with a Pivot Table at the top with a Filter and a data set returned from a DB2 database below it. I would like to filter the DB2 data set based on the Pivot Table filter that is enabled. Any ideas? Thanks! James, You can't filter two ranges on the same worksheet. You can, instead, drill-down on your pivot table, which will show all items that go into the value on a newly created separate sheet. The drawback to that is that you cna only drill down on one item at a time, and it is a separate sheet. HTH, Bernie MS Excel MVP "James" <an...

Deploying Report Manager with SSL leaves Help pages as http
Hi, I have an SQL 2005 Reporting Services box that is firewalled and only accessible via https. Reporting Services are therefore configured to require SSL connections (required for 3- All SOAP APIs). This is working perfectly. Unfortunately, the help pages are still advertised with an http link. This doesn't work due to the firewalls and produces an error message. There is a workaround - the users can manually edit the url in the address bar and then the help pages are accessed fine with https. In other words, IIS is correctly serving the https format, but the Reporting Se...

Question on the IMF filtering in exchange...
Hey I installed the IMF filter last night and it works great, with one exception. I set both thresholds to the same (5) and got almost all blocked emails into the archive that were junk...So that is good. However I had some users report that there was mail in their junk folder that should have been good Inbox mail. This I undersyand and can live with as folas-positives...the problem is, since both settings on the folter tab were set to 5, how does it know to send the mail to archive rather than Junk folder? Why wouldn't it just send them all to archive if both settings were at ...

Print Customer Statement (or similar report) w/o closing billing c #2
Print Customer Statement (or similar report) w/o closing billing cycle Is there a way to print a customer statement or similar report before closing billing cycle? None of the reports available would show/print a statement. Anyideas or suggestions? Thanks In Manager go to journal menu and choose Close Billing cycle. On the screen that pops up select Reprint Customer Statement in the Option box at the top. This will allow you to print a statement by date range without closing the cycle. It will warn you that you are closing the cycle but it really isn't when you just reprint so you c...

Booking Report (Sales Delta)
We are trying to figure out a way to create a bookings report. This report will have the delta of every sales order (qty or cost) over a given period of time. It will include the salesperson and item detail, as well. The idea is they know exactly how much true business was generated (or lost) during the period based on taking the new sales and increased extended cost and netting that against any decreases in extended cost due to cancellations or price discounts. They have audit trails, but have them turned off currently since it was causing performance issues in inventory. That was t...

Ho do I shift empty cells up in an access report
In my contact data base, I have an unequal number of data for each contact, some have 3 phone numbers some have up to 8 etc. I would like to print out a directory (phone book) in which records do only show fields that are populated. In other words, one record may only include 3 lines others may include 9 lines but I do not want to display and print a fixed number of lines, only the ones that are populated. GBA wrote: >In my contact data base, I have an unequal number of data for each contact, >some have 3 phone numbers some have up to 8 etc. I would like to print out a...

Access 2007 Run-time Error 2467 when accessing a listbox value on a sub form
I have a database that has been in production on Access 2003 for quite some time and has run without errors. A user's machine was recently upgraded to Access 2007 and now the database throughs a Run-time Error 2467 "The Expression you entered referes to an object that is closed or does not exist" on the following line that references a listbox value on a sub form. If Nz(Me.sfrm_Consultant_Contract_Request.Form.Cmb_Consultant.Value) = "" Then .. .. .. I changed the code to If Nz(Forms! frm_Main.sfrm_Consultant_Contract_Request.Form.Cmb_Consultant.Value) = ""...

Filtering without Filter
I just don't get the following. Any ideas? "A" row I have two different values I use: "Contact" and "Not a contact". "B" row I have the person's name (employee). "C" row I have a quantity, just one number. Now what I need is to output quantities of how many Contacts Employee1 or Employee2 or Employee3 have. Also what I need is to get the number of contacts - which can be found on row "C". Should I use COUNT.IF ? Row A can have 2 or more different values so should there be somekind of conditional IF function included? T...

Filtering #11
Hi, can ayone tell me how I could do the following in excel 2007 or 2010: Horse Trainer Sam M Jones John M Jones Colin S Attwater Steve J Jackson Brian B Mathers James B Mathers Martin G Raggy Patrick S Thomson What I want to do is filter the dataset on 'Trainer' so that it only shows me the Trainers who feature once in the list. So if I was to do this properly it would only show S Attwater and G Raggy as the other trainers have more than one horse..... Hopefully someone can help because it is driving me crazy !! Thanks David Give this macro a try... Sub HideDuplicateTr...

Capital Gains Report
When I do a Capital Gains Report for shares that I have reinvested the dividend the report gives an average cost for all shares and not the actual cost for each share purchase. Can this be changed?? -- Walk softly and carry a big stink!! In microsoft.public.money, Stevo wrote: >When I do a Capital Gains Report for shares that I have reinvested the >dividend the report gives an average cost for all shares and not the actual >cost for each share purchase. Can this be changed?? USA? Mutual fund? If so, check the CostBasis method in the InvestmentDetails for the fund. ...

Deleting Forms Dictionary
All, I wanted to delete all current customizations and Deleted the Forms.Dic, allot of the forms are not working, please help. Johnny Johnny, Your system Alternative/Modified forms and reports were pointing to the modified forms, which was deleted, so the system will need to be pointed to the original forms. You have two options to fix this up: 1. Go to: Dynamics GP Menu --> Tools --> Setup  System  Alternate/Modified Forms and Reports, choose the modified forms below one by one and mark the Dynamics radio button. 2. Go to Dynamics GP Menu --> Tools --> Utilities --&g...

Junk filter BEFORE other filters?
I am running Outlook 2003 and the Junk filter was working really well. Then I started making other filters...one of them looks for my domain name in the headers and if it's there it moves the email to a folder. Problem is, this filter seems to activate before the junk filter, so the junk sn't being filtered now! How can I set the junk filter to do it's job first and THEN to run my own rules? -- Bryan Anderson <www.anderson-it.com> I created this rule and set it as the first rule to run: Apply this rule after the message arrives with 'X-Spam-Level:******'or'...

Tenders report include tax collected
In reports >> Miscellaneous >> Tender Summary, is there a way to include what was the tax collected for that transaction? You could not do that. Reason being is that you can have multiple tender types per transaction. Therefore there is no way to determine what tender type paid what portion of the taxes. Example You have two taxes County and State at 2% and 6% respectively. You sell a couple of items let say one of them being tax exempt. Customer pays $10 as Cash and the rest as a Credit Card. There is no way to determine what portion of the taxes were paid with the $10 and wh...

Newbie Help with form
Hi, I am looking to have a form, where when I select one field in a combo box, it automatically updates all the other fields to match that list so for example.. I have a table with 3 fields telephone first name last name So I want a drop down box on the form, and when I choose the telephone number i want, it automatically shows the first and last name with it... Additionally I would want to be able to choose a last name, and it show the telephone and first name associated Access 2003 Thanks in advance On Wed, 13 Feb 2008 13:50:33 -0800 (PST), potentus <neopotent@gmail.com> wr...

Pasting into a filtered list
Can anyone tell me if it is possible to paste a list of price updates into a filtered list. - I have filtered the list to show just the products whose prices need to be updated, when I try to paste the updated prices, into the list, the prices are not just pasted into the visible cells but the hidden cells between. Can I paste into the visible cells only or do I have to update each line manually. I am using Excel 2002 Any help would be much appreciated Can you sort the list to bring the products that need updating together in the list? If not, try something like this: Your list of product...

Macro to copy a VLOOKUP formula
Hello, I was wondering if somebody could help me with this macro… I have some data with a filter on, so that only the rows with blank cells are showing. I want to enter a VLOOKUP in the cell, and copy it down to all the blank cells. I tried just recording a macro, but when I run the macro it doesn’t work. Any ideas of how to do it? Example: 1) Before the filter: Colums A -B - C A x x - 1st Row A - 2nd Row A x x - 3rd Row A - 4th row A x x - 5th row 2) After the fil...

apply filter macro
I have a access db that works on win xp but does not work on win 2007 I have a combo box that triggers a apply filter macro using a query sort. no problem on win 2000 or win xp or win 2003 Help AlT ...

IP filtering based on corresponding MX records
Hello Dears, How can I implement the following? Used: Exchange 2003 SP2 in FE/BE configuration; FE is in perimeter zone (capable to “speak” with DNS, BE, DCs and retrieve info) So, somebody connects my FE to sent an e-mail to one of domain users. I need something like that: When connecting, see the “mail from: user@somedomain.xxx”; Verify if there is a record MX for the IP address from which the connection was established in DNS for the domain “somedomain.xxx” If not – drop connection (attention: MX record, not SPF) Is it possible with Exchange 2003 SP2 only? How? Thank you, Alex I be...

Including field names in RTF Report filename
How do I include field names in the filename of a report that gets output to an RTF file? Have a confirmation report that's sent as RTF via email attachment and want the individual's first/last name to automatically be included in the report's file name. Base report is named Confirmation Email, when I use a button/OnOpen event to do: Dim stDocName As String stDocName = Me![lastname] & "Confirmation Email" DoCmd.OpenReport stDocName, acPreview, , "[id]=" & [id] It gets the last name (i.e., Smith Confirmation Email) in the filename, but I get ...