Hi Everyone,
I am trying to get a DLookup to work in a query. I have the following:
The first part takes the 11 string phone column and gets just the area code. Then I have an area code table and I want to associate the state with the area code. So here is what I have currently and it is throwing up a parameter box.
I cannot link the tables I do not think since I am using I cannot link the area codes together. Any suggestions on how to make this work?
AreaCodeST is in table tblareacodes
AreaCode is in table tblareacodes
Thanks!!
I am trying to get a DLookup to work in a query. I have the following:
Code:
Expr1:Left([Phone],3)
The first part takes the 11 string phone column and gets just the area code. Then I have an area code table and I want to associate the state with the area code. So here is what I have currently and it is throwing up a parameter box.
Code:
State: DLookup("[AreaCodeST] ","tblareacodes",[tblareacodes].[AreaCode]="Expr1")
I cannot link the tables I do not think since I am using I cannot link the area codes together. Any suggestions on how to make this work?
AreaCodeST is in table tblareacodes
AreaCode is in table tblareacodes
Thanks!!