473,398 Members | 2,404 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,398 software developers and data experts.

DLookup using Like and Wildcard finding a partial string (from table) contained in fi

i am trying to assign a client name to a record based on like. i want to find the client name from clients table where the partial name from the client table is contained somewhere within the field on a form. i've tried to move my quotes all around also tried single quotes but can't seem to have success. any help would be greatly appreciated!

Me.FieldName = DLookup("[ClientName]","Clients","*" & "[ClientPartial]" & "* Like " & Forms!FormName!FieldName)
Apr 4 '13 #1
2 2994
ADezii
8,834 Expert 8TB
Your request is a little confusing to me and I honestly do not see the Logic in it. That being said, you would have to:
  1. Check each [ClientPartial] Value in the Clients Table to see if it is contained withing the Form Field.
  2. If a [ClientPartial] is contained within the Form Field, do a subsequent DLookup() to extract the actual Client Name.
  3. This approach is hardly foolproof, however.
Apr 4 '13 #2
Rabbit
12,516 Expert Mod 8TB
Also, it is the right side of the like operator that uses wildcards. And strings need to be surrounded by quotes, you haven't done that. And also you are most definitely referencing ClientPartial incorrectly. I don't know where in your database it is but all I know is you're referencing it as a literal string and that's not going to do what you want it to do.
Apr 4 '13 #3

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

Similar topics

4
by: lecichy | last post by:
Hello Heres the situation: I got a file with lines like: name:second_name:somenumber:otherinfo etc with different values between colons ( just like passwd file) What I want is to extract...
3
by: aaapaul | last post by:
Hallo ! I have a Table with a column "ordernumber" ordernumber A12 A45 A77 A88
3
by: andreas.maurer1971 | last post by:
Hi all, since a few years I use the following statement to find duplicate entries in a table: SELECT t1.id, t2.id,... FROM table AS t1 INNER JOIN table AS t2 ON t1.field = t2.field WHERE...
9
by: keliie | last post by:
Hello (from Access novice), I'm building a switchboard form (using a Treeview object). The treeview is populated by two tables (tblSwitchboardParent and tblSwitchboardChild). Within...
1
by: wlupton | last post by:
Hi All; My problem is getting information from an Access database using a partial string in VB6. The database consists of tables of information on motor vehicles including a 17 character VIN...
3
by: Edwin Smith | last post by:
Hello: I have the following code which works on a DataGridView binding source: private void textBox1_TextChanged(object sender, EventArgs e) { this.pATIENTSBindingSource.Position =...
1
by: Dan Somdahl | last post by:
Hi, I am new to ASP but have what should be a fairly simple task that I can't figure out. I need to parse a string from a single, semi-colon delimited, 60 character field (el_text) in a recordset...
3
by: questionit | last post by:
We can get a value from a table with this method: abc =10 getResult = DLookup("", "", "='" & abc & "'") What if the resultant values are more than one. How would i retreive those? When age...
1
by: Edwin.Madari | last post by:
from each line separate out url and request parts. split the request into key-value pairs, use urllib to unquote key-value pairs......as show below... import urllib line = "GET...
4
by: bouldergirl | last post by:
I have 2 tables, Table 1 and Table 2 (see attached images)....Although in the example tables (attached), only a few records are shown, they both have about 1000 GRID values: Table 1 contains...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.