A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Search through Forms



 
 
Thread Tools Display Modes
  #1  
Old October 26th, 2009, 04:11 PM posted to microsoft.public.access.forms
KKash
external usenet poster
 
Posts: 12
Default Search through Forms

I want to put a Search field on a Form looking for a specific Profile ID.
There are Thousands of Forms/Records so using a Combo Box or List Box is not
neccessarily the easiest thing to utilize. I want to be able to enter the
Profile ID I'm looking for and then hitting a search button to find the
Form/Record. Any help with this would be appreciated. Thanks!
  #2  
Old October 26th, 2009, 04:44 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Search through Forms

On Mon, 26 Oct 2009 09:11:02 -0700, KKash wrote:

I want to put a Search field on a Form looking for a specific Profile ID.
There are Thousands of Forms/Records so using a Combo Box or List Box is not
neccessarily the easiest thing to utilize. I want to be able to enter the
Profile ID I'm looking for and then hitting a search button to find the
Form/Record. Any help with this would be appreciated. Thanks!


What are "Forms/Records"?

Records are stored in a table.
Forms 'display' or manipulate those records.
Actually, a combo box is the easiest and fastest method to locate a
specific record. Furthermore, the combo will only show ProfileID's of
those already in the database, therefore an incorrect user entry will
not be allowed.

Add a combo box to the form header. Use the Combo Box Wizard to do
this.
Select the 3rd option on the first page of instructions, something
like "Find a record ....".

When done make sure the combo box AutoExpand property is set to Yes.
Start entering the ProfileID. As you enter the ID, the Combo will jump
to the first ProfileID value that match the entered ID values. When
done the form will display that record.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old October 26th, 2009, 04:56 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Search through Forms

I would use a Combo box. You certainly don't have thousands of forms. You
may have thousands of records, but they will all use the same form object.
Don't get forms and data confused. Only tables contain data. Forms are only
a way to view and manipulate the data in the tables.

But, if you want to use a text box instead:

Private Sub SearchBox_AfterUpdate()

With Me.RecordsetClone
.FindFirst "[ProfileID] = " & Me.SearchBox
If .NoMatch Then
"No Matching Record For " & Me.SearchBox
Else
Me.Bookmark = .Bookmark
End If
End With

End Sub
--
Dave Hargis, Microsoft Access MVP


"KKash" wrote:

I want to put a Search field on a Form looking for a specific Profile ID.
There are Thousands of Forms/Records so using a Combo Box or List Box is not
neccessarily the easiest thing to utilize. I want to be able to enter the
Profile ID I'm looking for and then hitting a search button to find the
Form/Record. Any help with this would be appreciated. Thanks!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.