Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-20-2010, 11:16 PM   #1
jd2005
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jd2005 is on a distinguished road
How to? - MS ACCESSS Form to use SplitContainer or Splitter


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 is offline   Reply With Quote
Old 06-13-2010, 12:50 PM   #2
Tieske8
Registered User
 
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tieske8 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

Here's a splitter control, all VBA.
Tieske8 is offline   Reply With Quote
Old 06-14-2010, 12:36 AM   #3
jd2005
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jd2005 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

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 is offline   Reply With Quote
Old 06-15-2010, 11:35 AM   #4
Tieske8
Registered User
 
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tieske8 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

Is it any good?
Tieske8 is offline   Reply With Quote
Old 06-15-2010, 09:40 PM   #5
jd2005
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jd2005 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

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
jd2005 is offline   Reply With Quote
Old 06-16-2010, 02:12 PM   #6
Tieske8
Registered User
 
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tieske8 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

can you be more specific regarding the error/problem?
Tieske8 is offline   Reply With Quote
Old 06-17-2010, 10:47 PM   #7
jd2005
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jd2005 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

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




jd2005 is offline   Reply With Quote
Old 06-18-2010, 10:20 AM   #8
Tieske8
Registered User
 
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tieske8 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

Quote:
Originally Posted by jd2005 View Post
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?

Quote:
Originally Posted by jd2005 View Post
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?

Quote:
Originally Posted by jd2005 View Post
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 is offline   Reply With Quote
Old 06-18-2010, 10:28 AM   #9
Tieske8
Registered User
 
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tieske8 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

one more thing; if you set a breakpoint in the Form_Open eventhandler and step through the code, where does it fail?
Tieske8 is offline   Reply With Quote
Old 07-03-2010, 01:24 AM   #10
jd2005
Registered User
 
Join Date: Apr 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jd2005 is on a distinguished road
Re: How to? - MS ACCESSS Form to use SplitContainer or Splitter

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 by jd2005; 07-03-2010 at 01:31 AM.
jd2005 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Button on form to open another form Mike Hughes Forms 2 02-04-2009 03:59 AM
Problem Submitting Data to Table from Form Horizon57 Forms 1 08-12-2008 12:28 PM
Opening a form based on the same table as the calling form gbat Forms 4 05-23-2006 03:54 AM
Creating main form with two subforms HELP duckster Forms 8 09-20-2004 12:48 PM
Problems closing form Malcy Forms 2 06-19-2003 11:41 AM




All times are GMT -8. The time now is 07:04 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World