How to? - MS ACCESSS Form to use SplitContainer or Splitter (1 Viewer)

jd2005

New member
Local time
Today, 10:55
Joined
Apr 21, 2010
Messages
5

Hello all,
I have created MS ACECSS (2007) forms that are using "TreeView" control on the left and a connected form on the right. But there is a problem. the border between them is fixed...
I want to implement a "SplitContainer" Control or "Splitter" that will have a Treeview on the left side and the associated form on the right side and i can move the border between them.
I have seen many examples on the web for VB but could not understand how to implement it with MS ACECSS VBA. I was looking for the relevant OCX in windows.form for example. I was looking for the an ObjectX "Splitter" control in MS ACCES VBA, but none found.
Here are some references that i came accross:
SplitContainer Class (System.Windows.Forms)
A Splitter WIndow Control For VB - CodeGuru
Hope that someone can help me.
Thanks,
JD2005

 

jd2005

New member
Local time
Today, 10:55
Joined
Apr 21, 2010
Messages
5
Thank you very much. i actually came across this :
http://www.mvps.org/access/resources/downloads.htm#S (Look for "Splitter" - http://www.mvps.org/access/downloads/SplitterR2.0.zip ) which is mentioned in the article that you referred to. I have used it.

It works OK although ACCESS 2007 is not that cooperative. I have found that it causes few events "to loose their mind", like when using this splitter the "OnLoad" event of the form will not fire ! - I had to change the code to overcome this problem. There are other abnormalities which are inherent to ACCESS 2007 and this Splitter module brings them to surface.

What you have sent is an "upgrade" to this Splitter. so I am going to try it. thanks a lot.
 

jd2005

New member
Local time
Today, 10:55
Joined
Apr 21, 2010
Messages
5
No it does not work for me...., I am struglling with it and even sent a mail to the people who have written it... no answeryet...
The demo form is looking for an Activx control which i failed to find which one. I tried to define different libraries under the "references" but could not find which one has the control it is looking for.
Do you have the answer maybe ?
Thanks,
JD2005
 

Tieske8

New member
Local time
Today, 09:55
Joined
Jun 13, 2010
Messages
5
can you be more specific regarding the error/problem?
 

jd2005

New member
Local time
Today, 10:55
Joined
Apr 21, 2010
Messages
5
Yep. 1st of all I would like to thank you for your help.

The Error Message when running the Form:
"The expression On Error you entered as the event property setting produced the following error: A problem occurred while SPlitterDemo was communicating with the OLE server or ActiveX control"

I guess that the ActiveX / OCX library is not marked under references (http://www.bluemoosetech.com/microsoft-access-vba.php?jid=12&title=VBA%20Tools%20-%20References%20in%20Microsoft%20Access) .

MSACCESS does not tell which one is missing, so it is a work of trial and error or a comparison between your references to mine.

I have the following "Library References" marked. Can you compare to yours ?

Visual Basic For Applications
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft Visual Basic for Application Expansibility 5.3
Microsoft Access 12.9 database Engine Object Library
Microsoft Access 12.0 Object Library
Microsoft ActiveX DataObjects Library 2.8
Microsoft Windows Common Controls 6.0 (SP6) (MCCOMCTL.OCX)

IT SHOULD BE NOTED that the predecessor version of the "Splitter" that is mentioned in the article runs fine with these libraries settings.

I hope that this provides enough info to understand why it's not running.

Thanks for the help,

JD2005



 

Tieske8

New member
Local time
Today, 09:55
Joined
Jun 13, 2010
Messages
5
The Error Message when running the Form:
"The expression On Error you entered as the event property setting produced the following error: A problem occurred while SPlitterDemo was communicating with the OLE server or ActiveX control"
From the error (which I haven't seen before) it seems that the form (or some control on it) has in its properties a value set in the "On Error" property. Can you check all "On Error" properties on the form?
Are you just running the bare example as downloaded, or are you trying it into your own application?

Visual Basic For Applications
Microsoft Access 12.0 Object Library
OLE Automation
Microsoft Visual Basic for Application Expansibility 5.3
Microsoft Access 12.9 database Engine Object Library
Microsoft Access 12.0 Object Library
Microsoft ActiveX DataObjects Library 2.8
Microsoft Windows Common Controls 6.0 (SP6) (MCCOMCTL.OCX)


I have;
  • Visual Basic For Applications
  • Microsoft Access 12.0 Object Library
  • OLE Automation
  • Microsoft Visual Basic for Applications Extensibility 5.3
  • Microsoft Access 12.0 database Engine Object Library
Your list contains the "Microsoft Access 12.0 Object Library" twice... Is that correct?

IT SHOULD BE NOTED that the predecessor version of the "Splitter" that is mentioned in the article runs fine with these libraries settings.
I think there is nothing left of the original code except for the concept used and some comments.


Have you tried to run the Excel example? does that one work?
 

Tieske8

New member
Local time
Today, 09:55
Joined
Jun 13, 2010
Messages
5
one more thing; if you set a breakpoint in the Form_Open eventhandler and step through the code, where does it fail?
 

jd2005

New member
Local time
Today, 10:55
Joined
Apr 21, 2010
Messages
5
Problem solved ! at list partially....

The solution is here : http://support.microsoft.com/kb/907337 ("You receive an error message when you start Visual Basic for Applications code in an Access database")

I run this on WinXP and Win Vista both Hebrew enabled.

Solved the issue by changing the non-Unicode language setting on the computer where I am running the VBA code. Under Language for non-Unicode programs on the Advanced tab, changed it to English (was Hebrew).

So now it (The Splitter modules) runs fine.

The main problem resulting from this change is that some other programs would not show messages properly and would display ????? instead. but can still live with that (force all apps to dispaly english messages if you can).

It beats me why modules written in VBA (Methods in this case) without any Fonts relations would trigger errors related to Unicode handlling in the operating system !.

Microsoft to solve this.....

Thanks for your help.
 
Last edited:

Users who are viewing this thread

Top Bottom