Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 8th, 2013, 12:58 PM
Nullified's Avatar
Nullified Nullified is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 159 Nullified User rank is Sergeant Major (2000 - 5000 Reputation Level)Nullified User rank is Sergeant Major (2000 - 5000 Reputation Level)Nullified User rank is Sergeant Major (2000 - 5000 Reputation Level)Nullified User rank is Sergeant Major (2000 - 5000 Reputation Level)Nullified User rank is Sergeant Major (2000 - 5000 Reputation Level)Nullified User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 19 h 23 m 37 sec
Reputation Power: 30
Exclamation Generating Access DB Report with multiple where conditions

I am having some trouble adding a second where condition to my report cmdlet. This is what I currently has:
Code:
DoCmd.OpenReport "rptEvent2", acViewPreview, , "[EDate] Between #" & Format(Startdate, "YYYY/MM/DD") _
      & "# and #" & Format(Enddate, "YYYY/MM/DD") & "#"

It works properly, opening a report according to the dates specified, however I would also like to parse the report based on service type. I have a form with a multi selectable listbox that outputs the selected items to a comma delimited variable. I would like to add a where clause that outputs services that have been selected (in the s variable).


EDIT/UPDATE:
I got the following to work:
Code:
DoCmd.OpenReport "rptEvent", acViewPreview, , "[ServiceName]='ServiceNAMEhere' AND [EDate] Between #" & Format(Startdate, "YYYY/MM/DD") _
      & "# and #" & Format(Enddate, "YYYY/MM/DD") & "#"
But I still need to find out how to check for multiple items from a comma delimited string. It has also been braught to my attention that I may be able to use the built in filter with openreport, but unsure how to implement for multiple items.

Last edited by Nullified : January 8th, 2013 at 01:30 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Generating Access DB Report with multiple where conditions

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap