Lookup Help for Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I would like to populate a field in a table based on an entry from another
field in the same table. The auto-populated field should get its value from
another table within the database. I know how to do this in Excel and
believe I need to use DLOOKUP in Access, but I can't figure out the right
expression or where to put the expression. Here are the specifics:

table: project_info_new
table: isit_names

form: project_info_form_new

field: primary_isit_owner
field: owner_group

When I enter a name in the "primary_isit_owner" field on the
"project_info_form_new", which populates the "project_info_new" table, I want
Access to lookup the "primary_isit_owner" name in the "isit_names" table,
check the corresponding "group" field entry in "isit_names", and then place
that "group" field entry in the "owner_group" field of
"project_info_form_new".

Can this be done with DLOOKUP?

Thanks!
Tom
 
Did you try searching for your answer? This same type of question is asked
and answered several times in the last few posts.
 
Yes, from MS Help online and a few posts I have reviewed here I came up with
this for the control source entry of the text box that I want automatically
populated:

=dlookup("[group]", "isit_names", "[last_name]" =
forms![project_info_form-new]!primary_isit_owner)

I don't get errors for the entry, but the text box does not populate on the
form either.
 
Latest entry in Control Source is:

=dlookup ("[group]", "isit_names", "[last_name] = '" & me.prim_isit & "'")

This returns #Name in the text box instead of the value from "group" field
in the "isit_names" table. Any ideas?
Thanks.
 
Back
Top