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

Adding Filter

If any one can help me please
i am trying to add a fliter to a search in a form.
the form is used this way

the user inters a project number then the seach will conduct the search using the code below, which works fine.
i need to add a filter so the users can only see and brows through the project number they have entered in txt search which can be multiple records with the same project number.

thanks


ProjectNumber.SetFocus
ProjectRef = ProjectNumber.Text
txtSearch.SetFocus
strSearch = txtSearch.Text

'If matching record found sets focus in ProjectNumber and shows msgbox
'and clears search control

If ProjectRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congratulations!"
ProjectNumber.SetFocus
txtSearch = ""
Oct 5 '06 #1
1 1142
PEB
1,418 Expert 1GB
In fact you can do the search in your form in assigning the SQL condition to filter property in the form...

Or directly to the recordsource property modifing entierly your SQL behind your form!

Like:

Me.Filter ="Myfield='dfdfd'"

:)

Best regards!
Oct 8 '06 #2

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

Similar topics

5
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
4
by: David Link | last post by:
Hi, Why does adding SUM and GROUP BY destroy performance? details follow. Thanks, David Link s1.sql: SELECT t.tid, t.title, COALESCE(s0c100r100.units, 0) as w0c100r100units,
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
0
by: Sam Vanderstraeten | last post by:
Hi All, - Visual Studio 2002 - VB.NET > ASP.NET I created a DataGrid on a webform. This datagrid has sorting enabled. I want to create in the header of each column (that is a...
0
by: Cybermedia Marketing | last post by:
I'm trying to convert an ISAPI filter to an httpmodule. The ISAPI filter added custom headers to the response which could later be accessed by the asp page. ISAPI Filter: ...
4
by: KrippZ | last post by:
Hello ! I need some help with transparent png:s on my site. Currently i'm using the FILTER:PROGID:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"',sizingMethod='scale') method in a htc...
28
by: Ilias Lazaridis | last post by:
I understand that I can use __metaclass__ to create a class which modifies the behaviour of another class. How can I add this metaclass to *all* classes in the system? (In ruby I would alter...
0
by: Aishwarya | last post by:
Hello, I want to add a filter to an ultrawingrid such that the first column header displays a textbox in which the user can type the text and the filtering will occur based on the text...
2
by: Jay Balapa | last post by:
Hello, We have a webservice which is called by our pocket pc apps. We have a need to filter data, so we want to add a another method on top to the existing method. Existing Service.asmx...
6
by: banderson | last post by:
Hello, I have a form and a combo box that I use to filter the form to particular records. I also have an "add new" button that, when clicked, adds a new record. My problem is that the filter combo...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.