need help

jholar

New member
Local time
Today, 10:37
Joined
Aug 26, 2013
Messages
4
I have an access form and there is a textbox in which i enter a string and have a search button so I need the onclick event procedure to search a string from my table. so how do i do it in access 2010.
 
You have not explained how you want your search to work but this gives a basic solution to serach for a text string- you will need to change table, field and formnames to meet your requirements:

Code:
Me.Filter="myTable.myField='" & me.txtField & "'"
Me.Filteron=true
 
i have a textbox and i want to search for a particular string from my table from coloumn. it should be like once i click on search button it should show me all possible entries of that string from the coloumn of my table.
 
in that case my suggestion should do the job for you.
 
I have a table named By software and coloumn named Name, this coloumn contains the record that i am searching for. This code doesnt seem to work it gives me an error message.

Me.Filter = "By Software.Name='" & Me.txtField & "'"
Me.FilterOn = True

Compile Error:
Method or data member not found.

the textbox name is text1 and label for textbox is Enter your string.
what changes do i need to make in the event procedure.
 
I have a table named By software and coloumn named Name, this coloumn contains the record that i am searching for. This code doesnt seem to work it gives me an error message.

Me.Filter = "By Software.Name='" & Me.txtField & "'"
Me.FilterOn = True

Compile Error:
Method or data member not found.

the textbox name is text1 and label for textbox is Enter your string.
what changes do i need to make in the event procedure.

I see a few issues here. You have a some basic Naming Convention issues, and you have a structural issue with the Query.


Naming Convention issues:
  • Table, Field, Report, and Form Names should not include any special characters including, but not limited to !@#$%^&*()?\|. They also should not include spaces.
  • Table, Field, Report, and Form Names should not include any Access Reserved Words. "Name" is an Access Reserved Word.
Structural Issue:

Any Table, Field, Report, and Form Name that does contain special characters or reserved words needs to be surrounded with Square Brackets. Your Filter would then look like the following:

Me.Filter = "[By Software].Name='" & Me.txtField & "'"

OR

Me.Filter = "BySoftware.SoftwareName='" & Me.txtField & "'"

-- Rookie
 
Following on from AccessRookie

the textbox name is text1

you would use

Me.Filter = "BySoftware.SoftwareName='" & Me.text1 & "'"
 

Users who are viewing this thread

Back
Top Bottom