473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Search (Filter) one form from another

I am trying to set up a filter form that will filter data on another in a certain field.

Right now I have a text box (Text13) and a Command Button. The Button code is:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command15_Click()
  2. Dim code As String
  3. Dim inboundform As String
  4.  
  5.  
  6. code = "[Input Codes]='" & Me.Text13 & "'"
  7.  
  8.  
  9. DoCmd.OpenForm "Project Inbound", acNormal, , code
  10. End Sub
The problem is, I want to be able to type in part of what I am filtering... for instance the field may contain the value "NEW";"NEW, NEW2, NEW3"; or "NEW, TEST" I want to be able to type in NEW in order to get all 3 records back.

Any ideas?
Dec 5 '07 #1
2 1813
puppydogbuddy
1,923 Expert 1GB
I am trying to set up a filter form that will filter data on another in a certain field.

Right now I have a text box (Text13) and a Command Button. The Button code is:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command15_Click()
  2. Dim code As String
  3. Dim inboundform As String
  4.  
  5.  
  6. code = "[Input Codes]='" & Me.Text13 & "'"
  7.  
  8.  
  9. DoCmd.OpenForm "Project Inbound", acNormal, , code
  10. End Sub
The problem is, I want to be able to type in part of what I am filtering... for instance the field may contain the value "NEW";"NEW, NEW2, NEW3"; or "NEW, TEST" I want to be able to type in NEW in order to get all 3 records back.

Any ideas?
Try this in your code (FYI Chr(42) is ASCii for the wildcard symbol *):

code = "[Input Codes] Like '" & Chr(42) & Me.Text13 & Chr(42) & "'"
Dec 6 '07 #2
Try this in your code (FYI Chr(42) is ASCii for the wildcard symbol *):

code = "[Input Codes] Like '" & Chr(42) & Me.Text13 & Chr(42) & "'"

worked great... thanks!
Dec 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
9
by: Christopher Koh | last post by:
I will make a form which will search the database (just like google interface) that will look/match for the exact name in the records of a given fieldname. Any suggestions on how to make the code?
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
2
by: Homey! | last post by:
Hello all I am new to Access. I have imported data from an old FoxPro 2.x database. This is probably the most basic function but I cant get a search box to work. I need to search for company name...
2
by: rinmanb70 | last post by:
I have a QBF form/query and a report from the QBF that shows the results of the QBF. I would like to show the criteria on the report that was used in the QBF to get the info on report. I can't...
3
by: Elainie | last post by:
I would like to search a form with many fields on it, with out using the search facility through access. Througth a drop down list if possible.... How would I go about this? How could I also...
2
by: chungiemo | last post by:
Hi Everybody, I am using Alan Brownes Example of a search form example and I keep getting an error of the following:- Enter Parameter Value Msg Box with the entered Value "Mar" and I re-enter...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
2
by: woodey2002 | last post by:
Hi Guys and thanks for your time. I have a search form for my database that allows users to select multiple criteria from multi select list boxes. I successfully integrated a multi select...
6
by: woodey2002 | last post by:
Hi Everyone. Thanks for your time. I am trying to create a search form that will allow users to select criteria from multiple multi select boxes. So far i have managed to achieve a search option...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.