Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / December 2007

Tip: Looking for answers? Try searching our database.

Filtering on text field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
szag - 21 Dec 2007 14:18 GMT
I am using an on Double Click event to filter based on the current value on
that field. It works when I use it on a number field:

Me.Filter = "[forMthYr]=" & Me![cbMthYr]
Me.FilterOn = True

but when I apply the same code (below) to a text field it does not work - I
get parameter boxes popping up.

Me.Filter = "[ITResource_LName]=" & Me![tbITResource_LName]
Me.FilterOn = True

Any help is appreciated.

Zag
Klatuu - 21 Dec 2007 14:36 GMT
It works on a numeric field because there are no delimiters.  For text
fields, you enclose the value in single or double quotes.  For date fields,
you enclose the value in #.

Me.Filter = "[ITResource_LName]='" & Me![tbITResource_LName] & "'"

Signature

Dave Hargis, Microsoft Access MVP

> I am using an on Double Click event to filter based on the current value on
> that field. It works when I use it on a number field:
[quoted text clipped - 11 lines]
>
> Zag
szag - 21 Dec 2007 15:18 GMT
It worked. Thanks a ton!

>It works on a numeric field because there are no delimiters.  For text
>fields, you enclose the value in single or double quotes.  For date fields,
[quoted text clipped - 7 lines]
>>
>> Zag
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.