|
-
Nov 5th, 2003, 07:32 AM
#1
Thread Starter
Fanatic Member
Toolbar Actions [RESOLVED]
Hello everybody (hi DR NICK)
OK i have main MDI PARENT with a toolbar on it
i also have an mdi child with a paged view of a recordset (access db)
I would like to have on my toolbar a button for "fIRST rECORD"
a button for "NEXT RECORD", "Priv Record", "Last record"
I have these buttons on the child and they work fine using this kinda code
Me.BindingContext(DataSet11, "CustomerDetails").Position = 0
that makes it go to the start of the recordset
HOW CAN I MAKE MY TOOLBAR BUTTONS PERFORM THE SAME FUNCTION CONSIDERING ME.BINDINGcONTEXT & DATASET11 ARE NOT PART OF THE MAIN MDI PARENT ???????????????
Last edited by carlblanchard; Nov 6th, 2003 at 11:34 AM.
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Nov 5th, 2003, 10:33 AM
#2
Addicted Member
Write a public sub in the child form that contains the code to move the position of the dataset. Call that sub from the toolbar's button click event.
-
Nov 5th, 2003, 12:58 PM
#3
Thread Starter
Fanatic Member
code in my child
Private Sub NavRecStart()
Me.BindingContext(DataSet11, "CustomerDetails").Position = 0
End Sub
code in my parent
frmCustomer_View.NavRecStart()
get this message
An unhandled exception of type 'System.NullReferenceException' occurred in ManageMyHosting.exe
Additional information: Object reference not set to an instance of an object.
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Nov 5th, 2003, 03:11 PM
#4
In the click event of the toolbarbutton try this :
VB Code:
Dim F as frmCustomer_View = Me.ActiveMdiChild
F.NavRecStart()
F=Nothing
Then the same button should work no matter which child has the focus.
Hope it helps.
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|