473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Filter in Access Data Page

Hi,

I am programming a multi-criteria filter in an Access Data Page. I successed to make a simple criteria filter using the code below:

(the code is on a button click action)

Expand|Select|Wrap|Line Numbers
  1. MSODSC.DataPages(0).Filter = "Status= '" & SSTATUS.value & "'" 
  2.  
  3.     If MSODSC.DataPages(0).IsFilterOn then
  4.         ' If the filter is on, turn it off.
  5.         MSODSC.DataPages(0).IsFilterOn = false
  6.     else
  7.         ' Otherwise, turn it back on.
  8.         MSODSC.DataPages(0).IsFilterOn = true
  9.     end if
  10.  
Now, I'm trying to make a 2 criteria Filter. I tried the code below but it doesn't work, I get: Type mismatch: '[string: "Status= 'New'"]' when I use the button to filter.


Expand|Select|Wrap|Line Numbers
  1. MSODSC.DataPages(0).Filter = "Status= '" & SSTATUS.value & "'" and "Related= '" & SRELATED.value & "'"
  2.  
  3.     If MSODSC.DataPages(0).IsFilterOn then
  4.         ' If the filter is on, turn it off.
  5.         MSODSC.DataPages(0).IsFilterOn = false
  6.     else
  7.         ' Otherwise, turn it back on.
  8.         MSODSC.DataPages(0).IsFilterOn = true
  9.     end if
  10.  
Does someone know why I get this error?

Thanks a lot for your help and if you need more information please let me know.
Jul 31 '07 #1
3 1833
No one have an idea how to solve this problem?

I really need your help...
Jul 31 '07 #2
jhardman
3,406 Expert 2GB
is this ASP.NET?

Jared
Aug 2 '07 #3
Sorry but I have no idea...
Aug 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sanders | last post by:
I inherited an Access database and I have not worked with Access for very long. I have a Form that goes through a bunch of different queries until it spits out a datasheet with all kinds of...
1
by: Robert Neville | last post by:
I would like to add filter functionality to my database whether through the Main form or the subform. This question may be rudimentary, yet I have not less experience with filtering data outside...
0
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the...
7
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
2
by: Salad | last post by:
I have a log file with a list of records. The log file can be unfiltered or filtered. I have a command button to call a data entry form from the log. At first I was only going to present the...
3
by: Brad | last post by:
I have a response filter which injects "standard" html into my pages. The filter works fine when the initial stream is small enough not to buffer...or....if I have a large unbuffered stream (i.e. I...
3
by: Soulspike | last post by:
Form name to filter = frmSortFor Filter based on list box from frmTest= lstSortFor Form containing list box = frmTest Field (CompCodes) data format = "PM SM TS EW WA" I have a database that I...
5
by: Jim Mandala | last post by:
Using Access 2003 front end; SQL Server 2005 Back end: I have a complex form that has lots of data fields including about thirty or so checkboxes storing Yes/No data that I would like my users...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.