Re: Dlookup

Tech-Archive recommends: Speed Up your PC by fixing your registry



Syntax is wrong:

Dlookup("Last Name","Credit Cards","ID = " &
[Forms]![Transactions]![Selectcc])

--

Ken Snell
<MS ACCESS MVP>




"Docgreen" <Docgreen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:16EE5C52-8714-4A65-B838-BB9DFA76EEA9@xxxxxxxxxxxxxxxx
Help with Dlookup

I have two tables: one contains a table of clients credit card information
called Credit Cards. The other is a table of daily credit card
transactions,
called Transactions. I have a form based on the transactions table which
has
a list box based on the Credit Cards table displaying Last Name, First
Name
and ID not displayed. The list box is called Selectcc. I have a button on
the
form which triggers a macro. The idea is that the user selects the client
from the list, clicks on the button and the fields on the form are filled
by
the macro.

I am using SelectValue for each field ( are only a few). The Item :
[Forms]![Transactions]![Last Name] and the expression : Dlookup("[Credit
Cards]![Last Name]","[Credit
Cards]","[Forms]![Transactions]![Selectcc]"="[Credit Cards]!{ID]")

The expression does not return the field. Any help would be appreciated.



.


Quantcast