Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-04-2013, 07:07 PM   #1
cmpd
Newly Registered User
 
Join Date: Dec 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
cmpd is on a distinguished road
Using Filter Property with multivalued fields

Hi all,

I'm having a bit of trouble so decided to join up!

I have a subform query which includes EventName, Date, and Tags. Tags is a multivalued field.

What I need to do is allow people to filter this subform using the inbuilt filter, and then use the filtered data to populate a graph.

I am doing this by taking the Filter property from the form and then using VBA to build an SQL statement with the right data, and using that on the graph. It works fine when people filter on the EventName and Date fields.

However, when someone filters the Tags field, it fails. The filter property gets set to something along the lines of

([Lookup_Tags].[TagName]="whatevertagtheypick")

This syntax seems not to be supported when I put it into the SQL statement.

Any ideas on how to get it to work? If there's a completely different approach which is better I'm open to it!

cmpd is offline   Reply With Quote
Old 12-05-2013, 06:09 AM   #2
nathansav
Newly Registered User
 
Join Date: Jul 2010
Posts: 114
Thanks: 0
Thanked 2 Times in 2 Posts
nathansav is on a distinguished road
Re: Using Filter Property with multivalued fields

When you are modifying for SQL you will need to put it like this

Where FIELD like "*WHATEVERTHEYWANT*"

You can pull this out, by using instr and instrrev to search for the "'s and then mid to get the text inbetween them.
nathansav is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hellllp: How do I filter a multivalued Listbox field - VBA alhabkk Forms 3 12-01-2013 03:25 PM
How do I filter a multivalued Listbox field - VBA alhabkk Modules & VBA 1 11-29-2013 10:20 AM
Multivalued Fields zyousafi Tables 2 12-14-2011 04:43 PM
Use a ComboBox to Filter a MultiValued Field thensrud Forms 0 02-14-2011 01:07 PM




All times are GMT -8. The time now is 03:02 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World