G
Guest
Using Access 2002 XP Pro
I want to do something like the following in the CountrolSource of a report
field:
=DLookUp("[AdSourceDescription]","[AdSourceT]","[AdSourceID] = " &
[ClientSource])
AdSourceT has pk of a long int autonumber
ClientSource is a text field that stores the AdSourceID number from a
dataentry form combo box.
I want the report to print the AdSourceDescription, not the numeric code for
the description.
The above returns #Error
If I put:
=DLookUp("[AdSourceDescription]","[AdSourceT]","[AdSourceID] = '" &
[ClientSource] & "' ")
I also get #Error
If I put:
=DLookUp("[AdSourceDescription]","[AdSourceT]","[AdSourceID] = 1") ' force
return of walk-in
I get expected results (Walk-in which is the AdSourceDescription for
AdSourceID = 1
I can't get the 3rd (criteria) parameter of the Dlookup formed correctly to
take the numeric value from the text field (ClientSource) to match the long
int AdSourceID.
Thanks in advance, Allen.
I want to do something like the following in the CountrolSource of a report
field:
=DLookUp("[AdSourceDescription]","[AdSourceT]","[AdSourceID] = " &
[ClientSource])
AdSourceT has pk of a long int autonumber
ClientSource is a text field that stores the AdSourceID number from a
dataentry form combo box.
I want the report to print the AdSourceDescription, not the numeric code for
the description.
The above returns #Error
If I put:
=DLookUp("[AdSourceDescription]","[AdSourceT]","[AdSourceID] = '" &
[ClientSource] & "' ")
I also get #Error
If I put:
=DLookUp("[AdSourceDescription]","[AdSourceT]","[AdSourceID] = 1") ' force
return of walk-in
I get expected results (Walk-in which is the AdSourceDescription for
AdSourceID = 1
I can't get the 3rd (criteria) parameter of the Dlookup formed correctly to
take the numeric value from the text field (ClientSource) to match the long
int AdSourceID.
Thanks in advance, Allen.