Re: Automatic field filling

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 12/05/04


Date: Mon, 06 Dec 2004 12:12:36 +1300

Brian

The general principle, in the example you gave, is that the second table
should not have first name and last name fields in it at all. Apologies
if you already understand this, but it is not clear from your post what
you intend. When you enter the second table's ID number via the form,
you have identified the individual, and know the first name and last
name by reference to the first table, so it is redundant to store this
again in the second table. However, the requirement to have the first
name and last name displayed on the second form is something that often
arises. There are a number of approaches to this, one of which is to
make your second form based on a query which includes both tables,
joined on the ID field. That means you can include the first name and
last name fields form the first table directly into the query, and hence
onto the second form. When the ID is entered on the form, the names
will automatically be shown. In this case, it would probably be
appropriate to set the Enabled property of the first name and last name
controls on the form to No, and their Locked prooerty to Yes, as this is
probably not the place to allow editing of the name data.

-- 
Steve Schapel, Microsoft Access MVP
Brian Monk wrote:
> How do I set up a form that automatically fills certain fields once one piece 
> of related information is inputted? An example would be from a table with an 
> ID number and first name and last name fields, I want to fill a form for 
> another table and expect to just type in the id number and get the computer 
> to automatically fill in the other fields


Relevant Pages

  • Re: Yaris diesel head gasket failure
    ... > Apologies from a newbie to this group. ... However, my query is this: ... > warranty, and I would have expected them to do the job for free if it was ... Once the vehicle is out of warranty, ...
    (alt.autos.toyota)
  • Yaris diesel head gasket failure
    ... Apologies from a newbie to this group. ... I realise my query may not be relevant to this group, ... The head gasket recently failed on my Yaris diesel. ... Is this a known fault on these engines? ...
    (alt.autos.toyota)
  • Re: Susanna & Sarah, interchangeable?
    ... > My apologies if my reply was inappropriate. ... > I was simply trying to demonstrate that at least one part of the query ... > they were apparently distinct for the time period in the place so ... If I was abrupt, my apologies are due. ...
    (soc.genealogy.medieval)
  • Re: How are these sorted
    ... Of course - apologies - ... but what really puzzles me about this instance is ... >>> I can add records to the table with different surnames, ... >>> the query, ...
    (microsoft.public.access.queries)
  • Re: some more fuel!
    ... It's like they were saying, "we broke the rule, does it ... I think as a general principle it's OK for a team or driver to query ...
    (rec.autos.sport.f1)