A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Populate Form and Table with Related Fields



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2004, 04:47 PM
Kevin Sullivan
external usenet poster
 
Posts: n/a
Default 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  
Old May 26th, 2004, 03:56 PM
Michelle
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.