Hello,
I've got an access 07 form based on a table like this:
Store 1 2 3 4
1 27 23 54 67
2 43 56 21 78
3 76 65 23 87
4 56 23 87 54
Except the table has hundreds of stores.
The data is the number of kilometers between store's. I would like to enter the two store #'s into two text boxes and a third text box would display the number of KM between stores.
I could do this with excel using vlookup:
'C1'=VLOOKUP(A1,'Store to Store Distance'!1:65536,B+1)
store1 sheet range store2
Where this was on a separate sheet linked to a form to enter the two store numbers, a third box returning the value.
I have tried simulating the same effect with access using the dlookup function in the control source of textbox3:
=DLookup ("= & textbox2", "store to store distance", "store=" & textbox1)
I've tried using various combination of this syntax, as strings, numbers, etc. Even if I input the criteria manually into the control source i get an error
, any help on this would be appreciated.
Staticxxx
I've got an access 07 form based on a table like this:
Store 1 2 3 4
1 27 23 54 67
2 43 56 21 78
3 76 65 23 87
4 56 23 87 54
Except the table has hundreds of stores.
The data is the number of kilometers between store's. I would like to enter the two store #'s into two text boxes and a third text box would display the number of KM between stores.
I could do this with excel using vlookup:
'C1'=VLOOKUP(A1,'Store to Store Distance'!1:65536,B+1)
store1 sheet range store2
Where this was on a separate sheet linked to a form to enter the two store numbers, a third box returning the value.
I have tried simulating the same effect with access using the dlookup function in the control source of textbox3:
=DLookup ("= & textbox2", "store to store distance", "store=" & textbox1)
I've tried using various combination of this syntax, as strings, numbers, etc. Even if I input the criteria manually into the control source i get an error

Staticxxx
Last edited: