Sabtu, 21 April 2012

RE: [MS_AccessPros] Using subforms that are split forms

 

Rod-

As you've discovered, a Split Form View loses its "splitness" when you embed it
as a subform. To do what you want, you have to build a "split" form the
old-fashioned way. Change your current form to Single Form View. Create a
second form on the same Record Source and save it in Datasheet view. Embed that
Datasheet on your original form and make sure the Link properties are not set.
Then add code to the Current event of the subform in Datasheet view to keep the
two in sync:

Private Sub Form_Current()
' If on a new Record,
If Me.NewRecord Then
' Move the outer form to a new record
Me.Parent.SetFocus
RunCommand acCmdRecordsGoToNew
Else
' Sync the outer form by copying the Bookmark
Me.Parent.Bookmark = Me.Bookmark
End If
End Sub

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Villefranche-sur-mer, France)

------------------------------------

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of rodbevill
Sent: Sunday, April 22, 2012 7:27 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Using subforms that are split forms

 
I have started a new application for a local client. The app involves data that
I have divided into tables based on the type of data; i.e., correspondence,
payments, communications (internal), property, protest, etc. The main screen
will have the company information in the upper half of the screen and a tap
control in the lower half for each of the above mentioned data types. Within
each tab is a subform that specifies the data required and optional, the issue I
have is trying to create a couple of the subforms as a split form. When the
subform is created and tested standalone everything appears fine; however, when
put on the main screen and the specific tab is selected the subform does not
appear split (only the upper half - non datasheet appears).

Is there a way to accomplish the approach I am looking for or do I need to try
something else? The reasons for the split form is to allow the user to view
history for data such as payments and correspondence.

Rod

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar