PC Review


Reply
Thread Tools Rate Thread

Can I cursor through a Master form and display a synchronized Detail form?

 
 
Shayne G. Wright
Guest
Posts: n/a
 
      26th Jan 2005
[This followup was posted to microsoft.public.access.forms and a copy was sent to the cited author.]

Hi

I was wondering if the following is possible in Access97

I want to create a master form as a datasheet that displays all records
in my PROPERTY table. As I navigate through the master form datasheet,
and set cursor focus on individual records in the datasheet, I would
like my detail subform(s) to display synchonized data from child tables
of the PROPERTY table.

That is I want a master form for PROPERTY and detail subforms for each
of my related CUSTOMER, PROPERTY_LEGAL, PROPERTY_USE, CUSTOMER_OWNER
child tables. All tables have a FK/PK relationship with the parent
PROPERTY table using an ACCT_ID field.

PROPERTY - PROPERTY_LEGAL 1:M
PROPERTY - PROPERTY_USE 1:M
PROPERTY - CUSTOMER 1:1
PROPERTY - CUSTOMER_OWNER 1:M

So if I have my cursor on record in the master datasheet form, for say
ACCT_ID 12345, the detail subforms will display all PROPERTY_LEGAL,
PROPERTY_USE, CUSTOMER, and CUSTOMER_OWNER records for ACCT_ID 12345.
When I cursor down one record, to select ACCT_ID 12346, all subforms
will be synchronized and display all records for ACCT_ID 12346. That is,
whichever record is selected in master datasheet, will determine the
records displayed in each of my subforms according to the ACCT_ID of the
master record.

Oh yeah, I am not doing any data entry into my base tables...just
querying. So my tables should be protected from accidental updates.

Thanks and take care,
Shayne
 
Reply With Quote
 
 
 
 
Albert D. Kallal
Guest
Posts: n/a
 
      26th Jan 2005
yes, I would use continues forms in place of datasheets. You can see some
nice shots of grids, and several show a screen that syncs two forms as you
ask.

http://www.members.shaw.ca/AlbertKal...icles/Grid.htm

You don't mention how many "child" forms you plan to have, but lets assume
two.

So, you got the main form + two child forms you need to display.

So, I would built 3 grids using continues forms, or 3 forms in data sheet
view.

You then create a 4th form - unbound, and just a plain form...
Now drop in the above 3 forms.

In the master form (which is now a subform), in the on current event, you
place the following command to make the child forms follow this form.

me.Parent.Child1.Requery
me.Parent.Child2.Requery.


In the link child/master settings for child 1, you place:

linkChildFields main_id (whatever is the name of the field in
this sub-form that is used to relate back to the parent table)
LinkMasterFields [MasterForm].[form].[ID]

In the link child/master settings for child 2 form you place

linkChildFields main_id (whatever is the name of the field in
this sub-form that is used to relate back to the parent table)
LinkMasterFields [MasterForm].[form].[ID] ("masterForm" is the name of
the contorl you used to hold the master form).

You are done....


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.members.shaw.ca/AlbertKallal


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Master/Detail Form/Subform with Aggregate Detail Total update to M =?Utf-8?B?RGFuIEtsaW5l?= Microsoft Access 0 3rd Apr 2007 08:00 AM
Master/detail form John Microsoft ASP .NET 0 27th Dec 2005 11:28 PM
going from master form to detail form =?Utf-8?B?cm9kY2hhcg==?= Microsoft Access Forms 3 9th Jan 2005 07:47 AM
master-detail-form Patrick Döme Microsoft Access 1 19th May 2004 12:12 PM
Master- and detail-form Patrick Döme Microsoft Access 1 19th May 2004 02:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:43 PM.