Dlookup

D

Docgreen

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.
 
B

bhicks11 via AccessMonster.com

You have { in your code which should be [. You can test it out in the VBA
editor in the immediate window and see what you are doing wrong.

Bonnie

http://www.dataplus-svc.com
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.
 
K

Ken Snell \(MVP\)

Syntax is wrong:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top