472,353 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Using DLOOKUP Function to fill out Multiple Text Boxes ... Is this even possible

I have been having trouble with a simple Dlookup command that was Reccommended to me by a nice fellow named Vic, On the other hand I have statements like this that wont run they give me a run time error

Dim QuoteNumber As String

QuoteNumber = Me.txtQuoteNumber

Me.txtDealerNumber = DLookup("Dealer_Number", "Quote Table", "Quote_Number=" & txtQuoteNumber)

Me.txtCustomerName = DLookup("Dealer_Name", "Dealers Table", "Dealer_Number=" & txtDealerNumber)

I have a problem with the second DLOOKUP function because I dont think it may be possible to fill out multiple text boxes using multiple Dlookup commands. I have all of this running off a Command Button. The first part works fine It will get me my dealer number from my Quote table but the next few I am going to have to refrence from a different table (Dealers Table) And soemthing it not working.. Im trying to autopopulate
Dealer Address
Dealer City
Dealer State
Dealer zip
Dealer phone
Dealer Contact

All refrenced off of the Dealer Number that I had retrieved from the last DLookup
and now Dealers Table
Any suggestions?
Dec 12 '06 #1
2 2735
Nevermind Figured it out! apparently I had to have the last value in the DLookup function in " "

Thanks anyways
Dec 12 '06 #2
14,534 Expert Mod 8TB
String(text) values need to be enclosed in single quotes as follows:

Expand|Select|Wrap|Line Numbers
  1. Dim QuoteNumber As String
  3.    QuoteNumber = Me.txtQuoteNumber
  4.    Me.txtDealerNumber = DLookup("Dealer_Number", "Quote Table", "Quote_Number='" & txtQuoteNumber & "'")
Dec 13 '06 #3

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

Similar topics

by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in...
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode...
by: Bobbak | last post by:
Hello All, I am having trouble with this forum I am developing, I have this form that allows the users to add or modify employee information, and...
by: John Hargrove | last post by:
I am building a database to manage test samples in an environmental laboratory. I am learning Access as I go and don't know much about the...
by: Frustrated Developer via DotNetMonster.com | last post by:
I have developed a form that would allow the user to load and search a database several ways, by data range using two combo boxes, by specific...
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how...
by: Anekwe | last post by:
I'm modifying an Access 2000 database created by a co-worker who is no longer with the organization, and is trying to figure out one part of the...
by: Denise | last post by:
Front end is Access 2002, back end is linked Oracle tables. My users need to describe things in feet and inches and want to use the standard ' and...
by: solargovind | last post by:
Hello, I have few problem with Dlookup condition. I need to retrieve next record or previous record based on certain condition. The conditions are...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.