Senin, 27 Agustus 2012

RE: [MS_AccessPros] Using subforms that are split forms - revisit

 

Rod-

Yes, having no data might be something to do with it. Also, the sequence of
forms loading when you have forms / subforms can sometimes be a bit strange. It
is possible to have the subform load first (Load, Current events fire) *before*
the parent form is there. Consider adding an On Error Resume Next in the code
that assigns the bookmark to avoid attempting to assign the bookmark before the
"parent" form is there.

Crystal-

Rod can't use a split form in this case because he's wanting to embed it as a
subform. Split forms display the Single Form view part only when embedded as a
subform. He is "emulating" a split form by embedding a Datasheet form on his
Single View form.

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/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Crystal
Sent: Tuesday, August 28, 2012 6:11 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Using subforms that are split forms - revisit

Hi Rob,

bookmarks are temporary numbers based on a particular recordset -- they are NOT
record numbers.   Can you explain

> I thought the datasheet view would use the other have the split
> form as the parent.  Is this a wrong assumption?

yes, it is wrong.  both forms use Me.  Look where the code is ...

in a split form, the top and bottom will synchronize automatically

Warm Regards,
Crystal

 *
   (: have an awesome day :)
 *

________________________________
From: rodbevill <desertscroller@cox.net>
To: MS_Access_Professionals@yahoogroups.com
Sent: Monday, August 27, 2012 7:42 PM
Subject: Re: [MS_AccessPros] Using subforms that are split forms - revisit

My main form contains information about a taxpayer (sales tax).  This form
contains a Tab Control with several tabs.  The first tab contains information
about property being taxed.  This property form
was created as a split form manually.  The top view is various bound controls. 
The lower half of the split form is a datasheet view.

When the application is opened as error occurs within the split form.  The error
message is as follows:
  Run-time error '3159':
  Not a valid bookmark.
on line
  Me.Parent.Bookmark = Me.Bookmark
Currently the database tables are blank (no data) I suspect that this may be the
issue.  Each of the tabs are designed the same and may cause the same issue.  If
blank data is the issue is there a simple fix because as new taxpayers are added
the associated tables would have no data until either imported or manually
entered.

Hope this explains the issue.
Rod

--- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...> wrote:
>
> Rod-
>
> I'm having a hard time picturing what you've done.  Even when you put a
Subform
> control on a Tab control, the "Parent" of the form inside the Subform control
is
> still the outer form.  Is the "split" form (form + subform) now in a subform
on
> a tab in some other form?  Should still work fine.  Which exact statement is
> getting the error, and what is the complete error text?
>
> 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/
> (Paris, France)
>
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of rodbevill
> Sent: Monday, August 27, 2012 5:29 AM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Using subforms that are split forms - revisit
>
> I have developed a split form using the manual approach described in an
earlier
> post.  The main form is defined as a single form then a second copy is created
> using the datasheet view as the default.  This datasheet view is added to the
> single form to create the split form.  The link fields are blank and the
> following code is use in the current method of the datasheet view:
>
> 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
>
> This process appears to work fine with the form is opened.  However, when I
add
> the split form to tab control on the main application form I get an error 2449
> invalid method.  I thought the datasheet view would use the other have the
split
> form as the parent.  Is this a wrong assumption?  If so what would I call the
> other half of the split form once it is added to the Main application?
> Currently no data has been entered into the system, just trying to get the
> initial system to accept data with new data by user.
>
> Rod
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

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

Yahoo! Groups Links

[Non-text portions of this message have been removed]

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

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar