Looking up a related record in a related form

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

From: Jim Normile (JimNormile_at_discussions.microsoft.com)
Date: 11/03/04


Date: Wed, 3 Nov 2004 07:46:04 -0800

I have a “Clients” table with about 1000 records. Each record has an
autonumber ID which is also the primary key. I have built a simple “Clients”
form on the table for normal viewing and updating. Call this form “Form A”

I have a second “Transactions” table which records specific transactions
with the clients in the first table. Each transaction has an autonumber
ID/Primary key. In addition it has a lookup field which looks up the ID of
the Client from the “Client” Table, and creates a relationship with the
Client Table.

I have a Query which includes both of the above related tables, showing
required information from the “Client” Side and from the “Transaction side”.
On top of this query I have built a second form, which allows me to
view/update individual client and transaction details. Call this form “Form B.

When I look at Client records in Form A, I can see if there are associated
records in the Transaction table, through a small subform. I need to be able
to click a button on form A which will open Form B, and take me to the
related transaction record on Form B.

Using the form wizard I can easily open Form B, but I have not been able to
automatically go to the correct linked record in form B. I expect I need to
write a piece of VBA code for the “On Click” event on the button on form A,
but I haven’t managed to write the correct code.

Can anybody out there advise me:
(1) Is VBA code attached to the “On-Click” event on the button on form A the
correct approach??........IF not, what is the correct approach??
(2) Can you help me with the code please ??

My thanks in anticipation

Jim Dublin
03 November 2004



Relevant Pages

  • Look up a related record in a second form
    ... record has an autonumber ID which is also the primary key. ... Each transaction has an autonumber ID/Primary key. ... the Client from the "Client" Table, ... I have built a second form, ...
    (microsoft.public.access.gettingstarted)
  • Look Up a record in a related Access form
    ... I have a form "Clients" which views records in an underlying client table. ... Each client has an autonumber ID which is a primary key. ... Each transaction ...
    (microsoft.public.access.forms)
  • Look Up a record in a related Access form
    ... I have a form "Clients" which views records in an underlying client table. ... Each client has an autonumber ID which is a primary key. ... Each transaction ...
    (microsoft.public.access.forms)
  • Re: relationship & Input for 5 tables in a single Form impossible
    ... OrderID (Primary Key, Autonumber) ... TransportTbl (Transporting info of transaction) ... TranspoterID ...
    (microsoft.public.access.gettingstarted)
  • Re: Simply Accounting
    ... So now that directly updating client info is not looking to promising. ... how can you even assign the primary key to the reocrd you plan to add to ... Unfortunately we can't let that intern out of ...
    (microsoft.public.access.modulesdaovba)