473,320 Members | 1,909 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,320 software developers and data experts.

VB-Access Filter in Form

Hi,
I'm having this problem, seems no big deal but I just don't find the way to solve it: I have a field in a form where the user writes a filter criteria and then accepts by pressing a button. The filter works good until the user uses the ' * ' in the search field. In that case no data is shown. The simplest example is when the only filter criteria is *. All the data should be shown, but by this filter method no data at all is shown.

The part of the code is:
Expand|Select|Wrap|Line Numbers
  1. Form.filter="Segment " & = '" & Field.Value & "'"
  2. Form.FilterOn = True
Any ideas?
Thanks!
May 21 '08 #1
4 3665
puppydogbuddy
1,923 Expert 1GB
Hi,
I'm having this problem, seems no big deal but I just don't find the way to solve it: I have a field in a form where the user writes a filter criteria and then accepts by pressing a button. The filter works good until the user uses the ' * ' in the search field. In that case no data is shown. The simplest example is when the only filter criteria is *. All the data should be shown, but by this filter method no data at all is shown.

The part of the code is:
Form.filter="Segment " & = '" & Field.Value & "'"
Form.FilterOn = True

Any ideas?
Thanks!
Try changing your syntax for the filter as follows:

Form.filter="Segment = '" & Field.Value & "'"
May 21 '08 #2
NeoPa
32,556 Expert Mod 16PB
Try the following :
Expand|Select|Wrap|Line Numbers
  1. Me.Filter = "[Segment] Like '" & Field.Value & "'"
  2. Me.FilterOn = True
This allows the operator to specify whether he wants to use pattern matching or only an exact match.
May 22 '08 #3
Try the following :
Expand|Select|Wrap|Line Numbers
  1. Me.Filter = "[Segment] Like '" & Field.Value & "'"
  2. Me.FilterOn = True
This allows the operator to specify whether he wants to use pattern matching or only an exact match.
Thanks a lot! it solved the problem
May 27 '08 #4
NeoPa
32,556 Expert Mod 16PB
No problem - Pleased it helped :)
May 27 '08 #5

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

Similar topics

16
by: Terry | last post by:
Hi, I need some feedback. We are converting to .Net and we are trying to decide on whether to use VB.net or C#.net. As far as our current systems, they will probably be rewritten in ASP.Net. I...
13
by: Arsalan | last post by:
Is there any advantage in C# over VB.NET ? Or the difference is only syntax ? Can anything done in C# which cannot be done in VB.NET?
28
by: Andy | last post by:
Any good resources regarding benefitis by using C3 over VB? /Andy
34
by: Eric Wise | last post by:
Does anyone work for companies that actually implement both VB and C#? I know that you can do this in theory, I just find it hard to imagine that a company would split its programming technologies...
12
by: Leo Muller | last post by:
I always thought that moving from VB.NET to C# would be very easy. Even though so far it hasn't been hard, there are some annoying things, that may have to do with my visual studio settings. -...
16
by: Ben Hannon | last post by:
Hi, I'm writting a COM Class in VB.NET to be used in a VB6 project (Tired of the VB6 hassles with cloning and serializing an object). All my classes I need cloneable/serializable are now in a...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
25
by: Sharrukin Amiri | last post by:
Hello, I am using VB 6.0 for many years. Everytime I needed to build software applications, I just opened VB 6.0 and started coding. I am now looking VB.NET Express Edition and I find I can no...
19
by: lonelyplanet | last post by:
Hi, I'm studying for 70-306 using the book "MCAD/MCSD Visual Basic .NET Windows Applications" published by McGraw Hill (ISBN: 0-07-212583-7). I found the book has no programming exercise...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.