G
Guest
I´m trying to retreive a value by using
Dim answer As Varian
answer = DLookup("[myField]", "myTable", "[myId]= " Forms!myForm!myTextbox
in a VBA subroutine attached to a form, i.e extracting "myField" from "myTable" where "myId" corresponds to entry in "myTextbox"-textbox in form "myForm"
This syntax is in accordance with manual, under instructions/examples for function DLookup, but it will not compile because it says that the condition expression is incorrect. I'm using Access 2003 (VB 6.3) and cannot figure out what is wrong
If I hardcode the contition to for example [myId]= '15247' both compilation and run works
A'm I wrong or is there a bug in Access 2003 ? How can I get around this ?
Dim answer As Varian
answer = DLookup("[myField]", "myTable", "[myId]= " Forms!myForm!myTextbox
in a VBA subroutine attached to a form, i.e extracting "myField" from "myTable" where "myId" corresponds to entry in "myTextbox"-textbox in form "myForm"
This syntax is in accordance with manual, under instructions/examples for function DLookup, but it will not compile because it says that the condition expression is incorrect. I'm using Access 2003 (VB 6.3) and cannot figure out what is wrong
If I hardcode the contition to for example [myId]= '15247' both compilation and run works
A'm I wrong or is there a bug in Access 2003 ? How can I get around this ?