perform search in Form (1 Viewer)

lamha

Registered User.
Local time
Today, 05:21
Joined
Jun 21, 2000
Messages
76
I have an unbound text box and a Find command. If the user enter the ItemID and click Find, I want the subform to display data for that item. Does anyone know how to do this? I don't want to use combo box because the tblItem is forever long.
Thanks for any help in advance.
 

gino

Registered User.
Local time
Today, 05:21
Joined
Mar 16, 2000
Messages
117
the find command (Ctrl+F) is MSAccess default finding tool therefore it limits your options. yes, an unbound text box is the better route on finding a specific record. use a query to find specific records. in this case you insert this code under ItemID criteria in your query.

=[forms]![nameofyourform].[unboundfield]

then from your unbound field on your form you would insert data then click on a command button to pull up that query to bring up your specific criteria based on the unbound field. i can't fully explain myself but if you need help just let us all know.

[This message has been edited by gino (edited 08-17-2000).]
 

lamha

Registered User.
Local time
Today, 05:21
Joined
Jun 21, 2000
Messages
76
I tried as you suggested. When I click the Run Query cmd button, the query pop up instead. The subform is blank.
 

gino

Registered User.
Local time
Today, 05:21
Joined
Mar 16, 2000
Messages
117
your subform should be based on the query you designed.......
 

gino

Registered User.
Local time
Today, 05:21
Joined
Mar 16, 2000
Messages
117
i'm sorry to reply so late. got caught up at work. try requery.

put this in a command button on your main form

Me.subform.Requery

after filling in unbound fields requery should update the query you created. Your sub form should update.



[This message has been edited by gino (edited 09-08-2000).]
 
R

Richie

Guest
How is the find method supplied by access limited? I add a call function to the double click event of several text boxes on the main form if the data in the main / sub is linked correctly the subform will display accordingly, the options to search by part of field I find much faster than a combo / unbound text box.
 

lamha

Registered User.
Local time
Today, 05:21
Joined
Jun 21, 2000
Messages
76
Thanks for all of your help. I found another solution for this. I made a separate search form that search for part of the field, and open the form with subforms later.
 

Users who are viewing this thread

Top Bottom