Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLookup Formating

Status
Not open for further replies.

Dodge

IS-IT--Management
Jun 14, 2001
25
0
0
US
Is it possible to use a Variable at the beginning of a Dlookup statement? For instance:

Dim Location as Variant
Dim PartStr as Variant
Dim CurrentQtyStr as String

Location=Combo26.Value
PartStr=Text11.Value

CurrentQtyStr = DLookup(["'& Location &'"], "dbo_Inv Master", "[Inventory Part]='" & PartStr & "'")

I think the formatting is correct because when the program breaks, It shows the value of "Location", but is errors saying "MS Access can't find the field '|' referred to in your expression"

Any thoughts?
Dodge

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top