Re: Populating fields from a separate table



You don't need store the existing data in the second table, just store
the key from the first table and use a query to display the exiting
data when required. Remove the office and area columns from table two.

On your form to populate table two add a combo box control with;
row source type set to table/query,
row source set to table one,
bound column set to the column number of the 3-Digit(primary key),
Control source set to the field in table two that holds the
3-Digit number.
(the built-in wizzard will walk you through this)

To display the data create a query with Table two and table one as the
data source
use the 3 digit column from table two
Office and Area from table one
set the join type to a left join on the 3 digit column.

This method will allow you to add new offices, assign existing offices
to a diferent area and many other things with out having to go into
table two and "up-date" mismatched records due to the storage of
redundant data.

On Fri, 19 Aug 2005 22:22:07 -0600, "EJH" <seyahde@xxxxxxxxxxxx>
wrote:

>I have a Database that has three tables. One of the three is just a table
>that contains three fields and is filled with reference information. One
>field is 3-Digit(primary key), the next is Office, and the last is Area.
>The next table has the same type of headings plus several other fields but
>is not filled with data. I want to be able to create a form and enter a 3
>digit number in the 3-Digit field of the second table and have it extract
>information from the first table to fill in the Office and Area fields of
>the second table. There will be more information in the second table, but I
>just need to know how to populate these two fields. I have tried different
>functions, including a Dlookup, but I must be putting it in the wrong place
>or creating the syntax wrong. I am a newbie and appreciate any help.
>Thanks.
>

Have a nice day. ldpoos@xxxxxxxxxxxxxxxx

Remove NOPANTS. To reply by direct E-Mail;
Support: The Right to Privacy and Anti-SPAM projects
.



Relevant Pages

  • Involved query / possible over Access assistance.
    ... This is the idea I want to try to implement in an access database. ... I want to store the dayof the week that the event ... I want to then do a query for a given week. ... point during the week 1) display which dayof the week, ...
    (microsoft.public.access.queries)
  • Re: Best Practices on updating tables
    ... It is neither necessary nor appropriate to also store the ... need to display the companyID unless it's meaningful to the user. ... If you're running the query from VBA code, ... ' execute the querydef object; if there's an error, ...
    (microsoft.public.access.formscoding)
  • Re: SQL query to format datetime
    ... The data is not stored with any particular format - the format ... If you simply want to display 1/25/2005 when retrieving the datetime ... If you want to change the actual value, and store just the date, ... >Can I ask you a simple SQL query question? ...
    (microsoft.public.sqlserver.programming)
  • Count and display different services
    ... I have created a form based on a query. ... of times the clerk provided each service. ... The query asks for the clerks name, store ID, and the beginning and ... The results display the each service name and the count of each ...
    (microsoft.public.access.forms)
  • Count and display different services
    ... I have created a form based on a query. ... of times the clerk provided each service. ... The query asks for the clerks name, store ID, and the beginning and ... The results display the each service name and the count of each ...
    (microsoft.public.access.queries)