Creating Search form

  • Thread starter Thread starter hoshii
  • Start date Start date
H

hoshii

Guest
I would like to create search form with combo box. The user will select the value from the combo box and hit the search button, the data will came out with the related value. I have the table and query already. How should i integrate the search button with the value selected from the combo box? How can i call out the data?
Is it possible to implement it w/o VB code bcos i am a layman to VB.
 
I think it would be easier using VBA but then I like coding.

Without VBA:

1. Create the form, frmSearch, with a text control called txtSearchString.

2. Create what ever query you want, qryDataToDisplay where one of the fields is the field you are searching on.
In the criteria section for this field you would put the name of the text control from the search form, example, Forms![frmSearch]![txtSearchString]

3. Create another form, frmDataDisplay, to be used to display the information you need. This would be the information from the query, qryDataToDisplay, you created above. Make this query the data source for form frmDataDisplay.

4. In the form, frmSearch, where you created txtSearchString, create a command button, cmdFind, which opens frmDataDisplay.

That should be it. Once the user enters a value, then clicks on th command button the form, frmDataDisplay will pop up and show the information from the query, qryDataToDisplay.


ntp
 
I'm sorry, i' am a bit lost. What do u mean about text control? Where can i create it?
 
I also had the same problem, but followed the instructions. The text control is actually the name for the combo box.

1. In the form you would like to insert the combo box, in the properties, name it as txtsearchstring. say example you have named your form frmsearch
2. In the query design, under that unique value, put in the criteria Forms![frmsearch]![txtsearchstring]. This will reference the value selected by the user.


This worked for me so good luck! I was having a lot of trouble too!!.
 
If you want I can give a code to search value from table or query using vb code . Just send and email I will send u the table and form with codes . That will help u lot I am sure

My e-mail - anilthomas10@hotmail.com

or anil_t@khaldiya.com.kw
 

Users who are viewing this thread

Back
Top Bottom