Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 9th, 2005, 01:55 AM
edgarchado edgarchado is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 edgarchado User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 58 sec
Reputation Power: 0
Filter Report with combo boxes in form

Hi to all,

I have the following code in the Filter Command Button

The problem is that the Data Type of one of the combo boxes is
Date while for the second is Number (autonumber) so I am having problems
with data types when filtering

[code]
Dim strSQL As String, intCounter As Integer
For intCounter = 1 To 2
If Me("Filter" & intCounter) <> " " Then

strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "]" _
& " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & "" _
And ""
End If
Next

If strSQL <> " " Then
'Strip Last " And "
strSQL = Left(strSQL, (Len(strSQL) - 5))

'Set the filter Property
Reports![infReporte_Pedidos].Filter = strSQL
Reports![infReporte_Pedidos].].FilterOn = True
[code]

I know it has to do with the CHR(34) section, but I do not know how to fix it.

Thanks in advance.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Filter Report with combo boxes in form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT