473,835 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter Names With an Asterix

I have an account list. There's an asterix in the account name if it has
closed. For example, Acm* Corp. I don't agree with this design but that's
what our company came up with. Anyway, I'm trying to filter out these closed
accounts from my datagrids. In Access, I used to write WHERE ACCDESC NOT
"*[*]*" and that would filter them out. Not so in vb.NET. Anyone know how to
accomplish this? Thanks!
Dec 9 '05 #1
2 1482
What do you mean by "VB.NET"? You must be using a specific .NET
Framework class to hold your data, which you are trying to filter.

I'll assume you are using the RowFilter property on a DataView. If not,
this answer may not apply.

With a DataView named dv, this should work:

dv.RowFilter = "accdesc not like '%[*]%'";
Joshua Flanagan
http://flimflan.com/blog
Mike C wrote:
I have an account list. There's an asterix in the account name if it has
closed. For example, Acm* Corp. I don't agree with this design but that's
what our company came up with. Anyway, I'm trying to filter out these closed
accounts from my datagrids. In Access, I used to write WHERE ACCDESC NOT
"*[*]*" and that would filter them out. Not so in vb.NET. Anyone know how to
accomplish this? Thanks!

Dec 9 '05 #2
That worked perfectly. THANKS!

"Joshua Flanagan" wrote:
What do you mean by "VB.NET"? You must be using a specific .NET
Framework class to hold your data, which you are trying to filter.

I'll assume you are using the RowFilter property on a DataView. If not,
this answer may not apply.

With a DataView named dv, this should work:

dv.RowFilter = "accdesc not like '%[*]%'";
Joshua Flanagan
http://flimflan.com/blog
Mike C wrote:
I have an account list. There's an asterix in the account name if it has
closed. For example, Acm* Corp. I don't agree with this design but that's
what our company came up with. Anyway, I'm trying to filter out these closed
accounts from my datagrids. In Access, I used to write WHERE ACCDESC NOT
"*[*]*" and that would filter them out. Not so in vb.NET. Anyone know how to
accomplish this? Thanks!

Dec 10 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
11997
by: Matt | last post by:
Hi everyone, still pretty new to MySQL. I was wondering if there is a way to automatically filter records based on a mysql userlogin name?? I have serveral databases that I want to combine in order to manage the databases more efficiently. - I'm currently using MySQL 4.1.12 and I'm currently testing 5.0.14 - I have a databases for each user account. - Each database has the same schema and entity relation model.
1
3764
by: thijs.kupers | last post by:
Hello, I want to list all the user-tables of a DB2 database. I use the ADO-openSchema method (adSchemaTables), but I can't filter the systables out. Has someone any idea how to select only the user tables? (on a generic way)
3
5191
by: Dan V. | last post by:
How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select. I read at : microsoft.public.dotnet.framework.adonet "As others have posted: There is no SQL query processor for DataSets. You can use XPath with an XMLDataDocument built from the DataSet. You can also perform selections based on criteria, using the Find and Select methods, and you can create row filters using DataViews."
6
15232
by: phonl | last post by:
VB.Net 2005 I have a bound datagrid with a list of names. I want to add a button that will filter the names so that only the names that start with "H" will display. How would I do that? Thanks for help.
0
6805
bartonc
by: bartonc | last post by:
By encapsulating just a few fuctions from two library modules, we get a clear picture of what a digital filter looks like. Also, by splitting __init__ into two section, the filter's creation parameters and internal condition can be reset on the fly. """ Encapulates a scipy filter. Given type, freq and order, create the coefficients and internal conditions, etc.""" import scipy.signal.filter_design as fd import scipy.signal.signaltools...
9
6099
by: dee | last post by:
I'd like to filter by the following criteria: left(LeadDisposition,3) = "Sit" AND Appt_Date = Text767 I have no idea how to do this. Appreciate help.
8
3376
by: Abedin | last post by:
I have 9 digits in form of "111020402". Then I have another 9 digits in form of "111020403". I have 100,000 records of these two 9-digit numbers. I want to filter this as follows: District: 111 Charge: 02 Circle: 04
2
2351
by: dale5804 | last post by:
hi im using the code below to password protect a button on a form.... is there any code i can use within the below to *asterix* out the password when typed in cheers. Private Sub Edit_Staff_Click() Dim strInput As String, strMsg As String strMsg = "Enter your password to proceed." strInput = InputBox(Prompt:=strMsg, _ Title:="SCRM Security Check")
3
2681
by: franc sutherland | last post by:
Hello, I have a report which I filter using the me.filter command in the OnOpen event. Me.Filter = "OrderID=" & Forms!variable_form_name! Me.FilterOn = True I want to be able to open that report, filtered, from different forms. How do I carry the name of the current form into the
0
9802
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9652
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10559
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10230
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9343
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7765
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5802
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3990
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.