Solved Dlookup Please Help, I can't seem to get this into my head! (1 Viewer)

slharman1

Member
Local time
Today, 00:53
Joined
Mar 8, 2021
Messages
473
I am about as frustrated as can be.
This is straight from the MS support website:

The next example uses a variable, intSearch, to get the value.

Code:
Dim intSearch As Integer
Dim varX As Variant
intSearch = 1
varX = DLookup("[CompanyName]", "Shippers", _
    "[ShipperID] = " & intSearch)

How the hell is that different from my code like this:
Code:
    Dim quoteInput As Variant, quoteno As Variant
    
    quoteInput = InputBox("Enter quote number for new order:", "New Order From Quote")
    quoteno = DLookup("QuoteNumber", "tblQuotes", "QuoteNumber = " & quoteInput)
  
       If quoteno <> quoteInput Then
        MsgBox quoteInput & " is not a valid quote number"
        Exit Function
    End If
 

cheekybuddha

AWF VIP
Local time
Today, 06:53
Joined
Jul 21, 2014
Messages
2,267
Is this any different from this thread?

Starting a new thread isn't any more likely to get an answer more quickly!

Please answer in the other thread.
 

slharman1

Member
Local time
Today, 00:53
Joined
Mar 8, 2021
Messages
473
Is this any different from this thread?

Starting a new thread isn't any more likely to get an answer more quickly!

Please answer in the other thread.
Ok, thank you. I didn’t know that since it was solved.
 

Users who are viewing this thread

Top Bottom