Microsoft Access count with one smart search engine that will help you work quickly and safely. For this you will have to know what the search engine is about and how you can use it.
This information can be found in the following paragraphs of this post, in which We will explain to you what are the benefits you get when you use this tool. We will also show you the step by step you must do to use the smart search engine.
Do not miss anything because we will also explain the codes that you will have to incorporate if you want to adapt the search engine to your boards.
What is the Microsoft Access Smart Search Engine and what is it for?
Access smart search engine is a native tool of this program that allows you to find data according to different parameters. You will have the possibility to choose if you want to search inside or outside the same table and sort the results in a set way.
Also, You can choose if you want the search engine to find single or concatenated data. This is a very useful function when used in databases of large sizes, as the results can be found in just a few steps and without making mistakes. The latter is because Access count with one search assistant which helps you choose the source database and the results you want to display.
What are the benefits of using the smart search engine to search for data in my databases?
Among the most important benefits you will have when you use the smart search engine it has Microsoft Access is the possibility of power adapt it according to the fields of your tables. That is, you can create a code in which you will have to write the sentence so that it returns the data you want.
In addition to quickly find information in any database, large or small, you will be able set values that is obtained from another table and even from another query. Finally, you will be able easily sort the items I throw at you the search when you create such a field.
Learn step by step how to use the Access smart search engine
The step by step that you will have to do to use the Access smart search engine is:
- Once you have entered all the data you want you will have to select the option Search.
- Next, you must click on Type of data for the wizard to run.
- Tap on I want the lookup field to get the values from another table or query and choose the query or table that you want to use as the source of the information.
- Go to What value do you want to show in the search and select the field the query you want to configure for the search data.
- Click on Do you want to sort the items in your search? to establish an order of the result and finally choose To accept.
There is another way, a little more complicated, to use the smart search when you want to concatenate the data so that a group of them appears.
The first thing you should do is concatenate the data in your table and then continue with these steps:
- Go to Layout view. For this you will have to choose the tab Start and then select the function in the tool group Views.
- Next, go to the field where a result will occur and create an event. You can do this by pressing the right mouse button and then choosing Generate event.
- You will see a new window in which you will have to choose Code generator.
- Write in the field Private Sub
_Click (). - Then enter txtBuscar.Value = Me.
.Column (1) . - Keep writing txtSearch.SetFocus.
- And in the next line
.visible = False . - Then run the code RunCommand acCmdCopy.
- And finally Close. It should look like we show you in the following image, you should keep in mind that we have taken as the name of the column Name. With this you will make Access when you click on the column 1 I gave you the values of the column 2.
In the sentence, that is, in the Private Sub field, you will have to write:
- Private Sub txtBuscar_Change ()
- Criterion = Rem_Google (Me.txtBuscar.Text, »«, «*»)
- SQL = “concatenated data”
- Name.RowSource = SQL
- If Me.Name.ListCount> 0 Then
- Name.Visible = True
- Else
- Name.Visible = False
- End If
- End Sub
In this way what you are doing is telling the database that look for information that meets a certain criteria.
For this, you will have to write in the following field:
- Public Function Rem_Google (Text As String, Letter As String, Change_Letter As String) As String
- Dim Carac As String, CaracS As String, NroCarac, PrCarac, DescriFis As String, Letra_Asc As Double
- On Error GoTo Rem_TextoTrap
- PrCarac = 1
- Text = Trim $ (Text)
- NroCarac = Len (Text)
- Letter_Asc = Asc (»«)
- Dim str2 As String
- Character = Mid (Text, Character Pr, 1)
- PrCarac = PrCarac + 1
- If PrCarac
- If PrCarac
- GoSub CaracFis:
- DescriFis = DescriFis & Character
- End If
- Exit Function