T
Tom Brown
Ladies and Gentlemen,
I am trying to create a login screen which uses DLookup in the control
source of a textbox to pull the user location based on the user login
number. I have created a query that pulls the user location from an
underlying table based on the login # which then pulls the correct value to
the textbox. My question concerns using the Data-Control Source to enter
the DLookup value. The reason I use a textbox and not a combo box is
because the login user will be ONLY in one place, and I don't want a list to
come up giving the user the opportunity to pull ANY location from a list. I
guess I am confused about how to have the textbox point to a query using
something OTHER than the Control Source when you need the Control Source to
point to an area in the bound table.
In control source of textbox:
=DLookup("[BU_Name]","[tbl_users]","[Employee_Number] =
Forms![frm_Login_Page]![txt_E_Number]")
This works at pulling the correct value from the tbl-users table, but when
posted the entry does not post to the underlying (tbl_Master_Data) table.
Any help will be greatly appreciated.
Thanks,
Tom Brown
I am trying to create a login screen which uses DLookup in the control
source of a textbox to pull the user location based on the user login
number. I have created a query that pulls the user location from an
underlying table based on the login # which then pulls the correct value to
the textbox. My question concerns using the Data-Control Source to enter
the DLookup value. The reason I use a textbox and not a combo box is
because the login user will be ONLY in one place, and I don't want a list to
come up giving the user the opportunity to pull ANY location from a list. I
guess I am confused about how to have the textbox point to a query using
something OTHER than the Control Source when you need the Control Source to
point to an area in the bound table.
In control source of textbox:
=DLookup("[BU_Name]","[tbl_users]","[Employee_Number] =
Forms![frm_Login_Page]![txt_E_Number]")
This works at pulling the correct value from the tbl-users table, but when
posted the entry does not post to the underlying (tbl_Master_Data) table.
Any help will be greatly appreciated.
Thanks,
Tom Brown