473,394 Members | 1,759 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,394 software developers and data experts.

Query criteria based on string in a text field

64 64KB
Hi,

I have a query in which there is a text field called "name"
I have a form with a textfield called "name_client" in which the user can put in the (part of the) name of the client.

In the criteria part of the query i have;

Like "*" & [forms]![frm_client]![name_client] & "*"

But it will not filter on any part of the name of the client.
I would appreciate any suggestions on how to solve this.

Thanks and best regards,
Pierkes
Sep 8 '15 #1
4 1235
jforbes
1,107 Expert 1GB
Are you getting an error or are no records returned? Are you being asked for a parameter when you run your query? Have you made sure that frm_client is running and has a value entered in for name_client? Have you tried typing ?[forms]![frm_client]![name_client] into the Immediate Window to see what it evaluates to?
Sep 9 '15 #2
Pierkes
64 64KB
Hijforbes,

Problem is not an error message but no records returned.
I'am not being asked a parameter when running the query,, the form is running, the field is filled.

I did not use a ? Nor do i know what you mean by this....can you explain a little more?
Thanks,
Pierkes
Sep 9 '15 #3
jforbes
1,107 Expert 1GB
You can go into the VBA Edtitor (alt+f11), open the Immediate Window (ctrl+g) and type in ?[forms]![frm_client]![name_client] and hit enter and will Access will attempt to evaluate it and spit out the results.

If you are still stuck with it, you can flip over to SQL View and copy and paste the SQL here so we can try to help you debug it.
Sep 9 '15 #4
Pierkes
64 64KB
Hi Jforbes,

Turns out, i was looking at the wrong field in the criteria part of the query...solved it!
Thanks for your help, it was much appreciated!

Pierkes
Sep 10 '15 #5

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

Similar topics

2
by: neptune | last post by:
I have a query where each customer has an or . Sometimes both fields for a customer are populated, but if is null, then will be populated and vice versa. I have a form, , where I select a...
7
by: Triple7 | last post by:
Hi there, basically what I am trying to do (without using code as I don’t know how to do that with a code) is to retrieve the previous 5 days & the next 5 days (date wise)against a query1 that...
2
Ericks
by: Ericks | last post by:
Why is it that a table's Memo field in a Query behaves like a Text field, showing only the first 255 characters when using the Totals option. When turning off the Totals options all text is shown. I...
1
by: pipestew | last post by:
I have a form which allows me to enter a value and then view a report based on that value. The value is currently entered as P-##### and the query criteria is... !! I want the Form to have...
2
by: willyc | last post by:
Hello all, hopefully you will kind enough to offer some assistance.... I want to make what i believe could be quite a complex query, something beyond the 'basic' access queries. I'm not afraid of...
2
by: Phil Dell | last post by:
Hi all, Extremely new to Access and VBA, I have been working my way through several books and sites, and I'm finally breaking down and crying for help. I am developing a...
3
by: Phil Berkey | last post by:
Basically I'm trying to have a promotional code text field in a html form. If the correct promotional code is entered in the field the form would link to example1.html upon submission. If no code...
3
by: postman | last post by:
I have a report based on several criteria that the user can select in listboxes on a form. Each of these criteria have an "ALL" option which, if selected, will prevent that criteria from being...
7
by: Xenver | last post by:
ok, so i have a form with unbound check boxes on it, i want to alter a query criteria based on the check boxes values,so i have this as an example of my query criteria: IIf(!!=True,>0,Null) SS...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.