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

dlookup in form that returns the closest value

hi to yo all
lets say we have this table

tbl_city
ID ------- city
10 ------- london
20 ------- barcelona
30 ------- paris

and a form that consist of two text box(txt1,txt2),in the first one i enter a number and the other one contains a dlookup function that will run that number against tbl_city and will return the city name which its ID is the closest to the one i entered.

for example,if i enter 19 in txt1 i will get barcelona in txt2 and so on.
so,is that possible????
thank you in advance
Feb 23 '16 #1
1 1766
Seth Schrock
2,965 Expert 2GB
See the solution from This Thread. Just create a query and then use the DLookup without any criteria so that it will get the first record.
Feb 23 '16 #2

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

Similar topics

2
by: Edward | last post by:
I have the following function to determine if a form is loaded: Public Function modIsloaded(ByVal vstrFormName As String) As Boolean ' Error handling removed for concision ' Determine if...
3
by: tdmailbox | last post by:
I have a function that hashs the value that a user entered in a text box and stored that hash value as a password. All is well unless a user enters a password that when hased has a ; in it. If...
3
by: VMI | last post by:
In my Windows application, the main Form (Form_Main) calls a small Form (Form_X) that checks a file. Basically, I pass the name of the file through frmX's constructor and then I display it with...
12
by: chellappa | last post by:
hi All, function automatically returns the value,am not used "return" i am using Linux -gcc complier please tell me.... what is problem... source ===== #include <stdio.h> main() {
2
by: nikolacace | last post by:
Hi, I have a stored procedure (the code is below) that I use to retrieve one value from my database. I tested the code in Query Analyzer, and it works (I get the value I was looking for). However,...
2
by: Dustin Davis | last post by:
I'm creating a wizard and I've got multiple paths a user can go through and multiple forms depending on the options they choose on each form. Is it possible to have a form return a value, much...
3
by: ApexData | last post by:
Hello I completed an application that worked great until I went to STARTUP and shut off all of the checkboxes. My code uses "Application.CurrentObjectName" to get the current Form name. All my...
7
by: =?Utf-8?B?aXdkdTE1?= | last post by:
hi, im attempting to create an intellisense type form and have hit a roadblock. I need the form to return (like the ShowDialog method returns the dialog result) the value that was selected when the...
2
by: sturgeob | last post by:
Yep. Newby. I am asked to find the closest value to user defined value if not right on the mark. I can get it to determin it I have selected one of the generated numbers, but am at a loss how to...
3
by: raamay | last post by:
can anybody tell me why the following query returns null value. SELECT * FROM yjdf4_tbltenders AS a LEFT JOIN yjdf4_tblclass AS b ON a.cls = b.clid LEFT JOIN yjdf4_tblcategory AS c ON...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.