dlookup problems

B

b.bomgren

I am trying to get a dlookup function to populate a field in one of my
tables. The user will already have entered in data in the table
tbl_Loan Master for "Loan Number" and "Loan Name". In this new table
(tbl_LTLT) the user will enter the loan number and I would like the
dlookup function to populate the "Loan Name" field. The formula I am
currently using but is not working is: (I am entering this into the
fields default value)


=DLookUp("[Loan Name]","tbl_Loan Master", "[Loan Number]= " &
Tables!tbl_LTLT![Loan Number])


Any ideas???
 
J

Jeff L

You should not store the same data (like LoanName) multiple times in
your database. If you need the name, then you should be able to get it
by using the LoanID in one table and linking it to the table that has
the LoanName. Probably not the idea you were looking for, but it is
not good database design to store information like you are attempting
to do.
 
G

Guest

I agree with Jeff and would also add that it's considered a best practice to
require users to interact with data through a form, rather than directly in a
table. That being said, I think you could fix your DLookup problem by
removing the "Tables!tblLTLT!" from the criteria portion.

Barry
 
B

Bongard

Thanks guys I guess it may not make sense to store it twice. I am
inputting from a form into this table I was just thinking about having
both tables store the name and loan number information. But I guess if
I am doing a query or something I don't need this in both tables.
 

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

Top