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  

Looking up a related record in a related form



 
 
Thread Tools Display Modes
  #1  
Old November 3rd, 2004, 03:46 PM
Jim Normile
external usenet poster
 
Posts: n/a
Default Looking up a related record in a related form

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

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot add or change a record because related record is required SlimJim Using Forms 1 September 6th, 2004 01:58 AM
Transferring Current Record From One Form To Another Abilly General Discussion 1 August 3rd, 2004 01:05 PM
auto entry into second table after update Tony New Users 13 July 9th, 2004 10:42 PM
Passing value to modal child form in MS Access using VBA? Grahammer Using Forms 6 July 4th, 2004 11:53 PM
Updating field on a record that has related records. David Andrews General Discussion 3 June 10th, 2004 10:16 AM


All times are GMT +1. The time now is 07:21 AM.


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