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

Need Help with DLookup Function in Access

Dear all,

I have a table with the names and address of all my dealers along with
their telephone nos.
I want to create a form, wherein I just enter the telephone no; the
query/function searches the string in the table and throws the name and
address details of that respective dealer back on to the form.

Please give me a detailed guidance as I am not an expert in Access.
Please help me with the process and teh VBA codes

my form name is form1
table name is dealer
Regards
Rajesh

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
3 1580
"Rajesh Sharma" <sh********@airtelindia.com> wrote in message
news:9r*************@news.uswest.net...
Dear all,

I have a table with the names and address of all my dealers along with
their telephone nos.
I want to create a form, wherein I just enter the telephone no; the
query/function searches the string in the table and throws the name and
address details of that respective dealer back on to the form.

Please give me a detailed guidance as I am not an expert in Access.
Please help me with the process and teh VBA codes

You don't need to use any code for this, Access has a search facility built
in. Search the help for "Filter by form", it should suit your requirement
perfectly.

Regards,
Keith.
www.keithwilby.com
Nov 13 '05 #2
Hi Keith,
I could not make much headaway with the resolution, can you please help
me understand how that will work.. in detail if you can
Regards
Rajesh

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3
Place an unbound textbox on the form for the user to type in the phone
number. Place a button on the form for the user to click to start the
search. In the Click event of the button:

Me.Recordset.FindFirst "[PhoneNumber] = '" & Me.txtPhoneNumber & "'"

If the number exists, the form will move to that record. If the number
doesn't exist, nothing will happen. If you want to let the user know, add:

If Me.Recordset.NoMatch Then
Msgbox "The number was not found!", vbOkOnly + vbInformation, "No Match"
End If

This will require using the DAO library. If you get an error, you may not
have it selected. If so, in the code editor go to Tools|References. If there
isn't a checkbox next to Microsoft DAO 3.6 Object Library, scroll down the
list of items until you find it, check it, and click Ok.

--
Wayne Morgan
MS Access MVP
"Rajesh Sharma" <sh********@airtelindia.com> wrote in message
news:9r*************@news.uswest.net...
Dear all,

I have a table with the names and address of all my dealers along with
their telephone nos.
I want to create a form, wherein I just enter the telephone no; the
query/function searches the string in the table and throws the name and
address details of that respective dealer back on to the form.

Please give me a detailed guidance as I am not an expert in Access.
Please help me with the process and teh VBA codes

my form name is form1
table name is dealer
Regards
Rajesh

*** Sent via Developersdex http://www.developersdex.com ***

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul Mendez | last post by:
I really need some help Date Code ConCAT Bal_Fwd NS_Fees Amt_Coll Cur_End_Bal 1/15/2004 KW 11KW2003 $500.00 $250.00 $250.00 2/15/2004 KW 12KW2003 $300.00 $500.00 ...
2
by: DD | last post by:
I have developed a a nice little software package(Packaged with Wise and SageKey) My product works great in a clean enviroment on Win98 and Win2k and XP As soon as i introduce Office 2000 Pro onto...
6
by: Don Sealer | last post by:
I've written this expression for a DLookup function. It works almost alright. What I'm trying to do is type in a description and the ID field (number) populates automatically. It works almost as...
6
by: deejayquai | last post by:
Hi I'm attempting to append multiple values into a new record, using multiple criteria from a listbox. I've got the basics for the code below but I get an "Error 3085 Undefined Function" for...
2
by: Don | last post by:
Can someone help me fix my DLookup problem. I'm far from proficiency with Access. I've been creating databases for several years for work with the help of many of you and trial and error. I have...
21
by: Thelma Lubkin | last post by:
I would like my DLookup criteria to say this: Trim(fieldX) = strVar: myVar = _ DLookup("someField", "someTable", "Trim(fieldX) = '" & strVar & '") I don't believe that this will work, and I...
0
by: musman | last post by:
hey all, I have tried to use the select statement instead DLookUp function as i have sql server at my backend and access as my front end. But neither DLookUp function is working nor select state...
2
by: nvs | last post by:
Hi All, My Access 2003 Application was created on MS XP and worked perfectly. After installing it on Vista I have noticed that DLookUp function does not work on Forms. It generates Error inside...
2
by: RoadrunnerII | last post by:
Hi All I am new to this forum and still learning MS Access. Hoping this is the right place to ask If not please let me know! Looking for some help with the SQL statements in Access 2003 with the...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
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
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
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
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...
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.