how to duplicate the function of some of the toolbar buttons

Atomic Shrimp

Humanoid lifeform
Local time
Today, 20:16
Joined
Jun 16, 2000
Messages
1,954
I have a form which really needs to be modal and popup, as it will fit on the screen, but not when it's inside the access window (also, making it modal would effectively prevent the user from exiting Access by any other method than the close button I provide)

Now, the problem with this is that it makes the toolbar unavailable, so what I would like to do is create my own set of buttons that will sort the datasheet subform by whichever column the system caret/focus is currently in, like the A-z and Z-a buttons on the toolbar.

any ideas?

Mike
 
How?

the subform doesn't apear to have such a property...
 
Will the custom menu bar be acessible with a popup modal form?
 
Yes if you use a popup menu if you have short cut menu set to yes on the forms property sheet right click and the default sort popup menu bar will appear.
HTH
 
hmmmm, thanks Rich, but unfortunately not exactly what I'm looking for (fussy me) - I want to put the function behind a button that's visible all the time
 
Rich, I think that a custom toolbar also won't be accessible when the form is modal and popup.

Can anyone tell me how to set the OrderBy property of a datasheet subform in VBA from the parent form's class module?

[This message has been edited by Mike Gurman (edited 05-09-2001).]
 
Got it, it's:

Me.SubFormName.Form.OrderBy = "[fieldname]"

Now all I need is the code for finding the name of the field with the system caret.
 
This is probably too late, but its always useful completing a post...

Code:
MyField = Me.ActiveControl.Properties("Name")
Me.OrderBy = "[" & MyField & "]"
 

Users who are viewing this thread

Back
Top Bottom