|
-
Mar 8th, 2006, 06:19 AM
#1
Thread Starter
Addicted Member
How to use Search Button on Form in Access
hi all,
how can i use the search button on form ??
i know that access provided inbuild search button but how can i add the condition for which that search button will work ??
thanx in advance .
Regards,
Nilesh Thakur. 
-
Mar 8th, 2006, 11:41 PM
#2
Re: How to use Search Button on Form in Access
how can i use the search button on form ??
i know that access provided inbuild search button but how can i add the condition for which that search button will work ??
Hi,
What do you mean by search...What are the criterias/conditions of your search button...Please elaborate further....
Thanks...
-
Mar 9th, 2006, 02:24 AM
#3
Thread Starter
Addicted Member
Re: How to use Search Button on Form in Access
Hi KGComputer,
pls tell me how to search with any example from your side ...
thanx and Regards,
Nilesh Thakur. 
-
Mar 9th, 2006, 09:21 PM
#4
Re: How to use Search Button on Form in Access
Hi,
Here's a code snippet for a simple search using the combo box..I assume your form is bound to one table only say tblCustomer...Add some textbox which are also bound to the table...The combo box is unbound...
In the properties change the row source type to table/query, and the row source to tblCustomer..
Attach the code in the combo box afterupdate() event..
VB Code:
Private Sub Combo8_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object 'rs means recordset that will retrieve info in your table
'tblCustomer
Set rs = Me.Recordset.Clone
rs.FindFirst "[Customer_ID] = " & Str(Nz(Me![Combo8], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Regards,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|