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

How to add a filter in Acess in VB

How do I add a filter in VB?
is this enough: DoCmd.ApplyFilter , "LastName = 'King'" or I
need something before this which would say in which table or query?
And how do i close the filter,how do i remove it?

Danijela

Nov 13 '05 #1
1 1811
da****************@gmail.com wrote:
How do I add a filter in VB?
is this enough: DoCmd.ApplyFilter , "LastName = 'King'" or I
need something before this which would say in which table or query?
And how do i close the filter,how do i remove it?

Danijela

For a form, I like Filter And FilterOn
Sub SetFilter(strFilter As String)
Me.Filter = strFilter
Me.FilterOn = (strFilter > "")
End Sub

You could pass this to set a filter to display records with ID = 123
SetFilter "ID = 123"

And to clear a filter
SetFilter ""
Nov 13 '05 #2

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

Similar topics

1
by: Sergio del Amo Caballero | last post by:
I want to access div elemnent and make them visible or invisible with a condition. They belong to a particular class or not. I was reading the newsgroup old posting about classname acess and some...
0
by: danijela.simunovic | last post by:
How do I add a filter in VB? is this enough: DoCmd.ApplyFilter , "LastName = 'King'" or I need something before this which would say in which table or query? And how do i close the...
1
by: Suresh | last post by:
Hi, Iam trying to develop a client in C# on .NET, that would acess a webservice written in Java.I dont know anything about what kind of WSDL would be required, how to set the web references...
1
by: Fabiano | last post by:
Please, i created a webpage that let's user upload a file to server. At my codebehind i need to save this file into a directory of another server (webfarm). The olny problem is that only some...
2
by: Rodrigo Ferreira | last post by:
How can i interligate my app with a DB in MS Acess? I don't know how to do that! Greetings.
0
by: minhadd | last post by:
Hello Would Anyone help me ?? I want insert into Microsoft Acess visitor's IP by ASP. But It is not working ...
6
by: bradb | last post by:
Hello, I have a textbox with an empty span element (place holder) next to it. When the user adds some text to the text box, I create a checkbox in the empty span element. When I create the...
4
by: gogo | last post by:
my C program crashes due to segfault . And on using gdb it shows message "can not acess memory at address ox0" what could be the possible problem. Program is vary complecated so i can not simple...
1
by: lokeshreddy16 | last post by:
'this is my code plz guys help how to save data from vb 2005 and other this that i am able to view the data from acess but i am not able save to acess i dont whether my code for save is correct of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
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...
0
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...
0
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,...

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.