If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Populate Form and Table with Related Fields
I have a table named tblData. It has fields [Client] and [State] in
it. I have a table named tblStates. It has fields [S_Client] and [S_State]. I have a data entry form named frmDataEntry. The form's source is tblData now. When a user pulls up the form, enters a [Client] and tabs out I want [State] to populate on the form with the value from tblStates.[S_State]. I also would like the tblData to store the [S_State] value in the [State] field. Any help would be appreciated. :^) !! Thanks, Kevin |
#2
|
|||
|
|||
Populate Form and Table with Related Fields
I had a similiar issue and here was my solution.
I ran a query, selected fields needed and saved the query with a name of "Lookup_Cust". I opened the form and created a combo box using the query "Lookup_Cust" as the source. So, the combo box targeted the customer number from query "Lookup_Cust" and combobox 89 was created. Under the properties for combo89 I went into the Data tab, then row source and typed the following: SELECT DISTINCTROW CUST_LOOKUP.[CUST_NO], CUST_LOOKUP.[CUSTOMER NAME] Then I created a "text box" and under the text box properties - Data Tab - Control Source - field I typed =[combo89].[column](1). Now, when selecting a customer number on the form in the combobox 89 the customer name is automatically populated in the text box. Hope this helps. ----- Kevin Sullivan wrote: ----- I have a table named tblData. It has fields [Client] and [State] in it. I have a table named tblStates. It has fields [S_Client] and [S_State]. I have a data entry form named frmDataEntry. The form's source is tblData now. When a user pulls up the form, enters a [Client] and tabs out I want [State] to populate on the form with the value from tblStates.[S_State]. I also would like the tblData to store the [S_State] value in the [State] field. Any help would be appreciated. :^) !! Thanks, Kevin |
Thread Tools | |
Display Modes | |
|
|