JRO synchronization using VB6 and MS Access Permissions issue

Posted on 2007-04-04
Last Modified: 2008-02-01
I have created an application in VB6 (XP Operating System) that uses an Access Database backend. The application is to be installed to a laptop where a user can enter data without being logged into out network (MS Active Directory) because each laptopt has a replica database. The master resides on one of our servers. When a user needs to synchronize there data, they log in to our netword, open the application and click a button. The button runs a sub that is using JRO to do the sync.
My problem:
When I run my application (I have admin rights to the entire network), I don't have a problem with the synchronization process. But if I log into the network as a regular user (User Rights), I get a run time error 13 saying Type mis match. I know the problem is the permissions of the user loging into the network, but I'm not sure about how to go and fix the problem.
I thought if I got feed back from others they might be able to direct me to a better way of doing what I am doing, or maybe state something that might resolve the permissions issue.
Question by:AmericaFan
  • 3
  • 2

Expert Comment

ID: 18871715
Not sure about JRO, I use ADO.  What statement are you getting the 13 on?

Author Comment

ID: 18872089
quiklearner, Sorry. I'm new here. I figured out what the problem was. Users need to have Power User Rights on their laptops in order for the database to sync.
Is ADO better? I only used the JRO because I found an example years ago and never thought to look and find how to do it other ways.

Accepted Solution

quiklearner earned 500 total points
ID: 18873426
Well from what I know, ADO (ActiveX Data Objects) is pretty easy to use.  It offers easy support for connecting to most db types, and has ties into the datasource properties of the standard listboxes/comboboxes.  Releases of it are included in Microsofts MDAC installs/updates (Microsoft Data Access Components).  If you are familiar with the object browser (f2 in the VB IDE) you could reference anything labeled "Microsoft ActiveX Data Objects X.X Library" where X.X is the version; you probably several but choose just one, and look through it.  Your built-in help (f1) will contain help on the objects/methods/properties too.
Now I am curious as to what would have generated a type mismatch based on that.  Did you ever isolate the line it was occuring on?  To do so just run it in debug.  If you can't, guess as to where the issue occurs.  Number the lines and assuming you are not trapping for errors add "On Error Goto PROC_ERROR" to the top of the function/sub/property.  Remember, if you call other functions/subs/properties of yours, you will need to also modify those functions/subs/properties to do this as well.  At the end of each of these functions/subs/properties place:

Exit Function/Sub/Property
MsgBox "Runtime Error " &  Err.Number & "(Function/Sub/Property Name:" & VBA.Erl & ")" & vbCrLf & _  
End Function/Sub/Property

Then compile it.  This will tell you where the problem is.  Line numbers go on every line except Public/Private/Friend/Dim statements as well before the first Case, after the select statement.  Usually people initially numbers lines in multiples of ten so there is room to grow without having to renumber a bunch (you still me have to some):

10  If x = 45 Then
20      MsgBox "I got " & x
30  End If

Author Comment

ID: 18882987
I never knew I supposed to place the error routeen in fuctions/sub within fuctions/sub. Maybe that is why don't always work :)

Expert Comment

ID: 18883112
If you want to isolate it all the way down to the actual line it errors on, it would be a good idea.  If you are not concerned about that much granularity then you probably don't need to.  BTW I forgot to point out that in the sample above VBA.Erl prints the line number the error occured on..

Featured Post

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 61
Excel - Save a copy of work book 13 83
How does CurrentUser work? 10 31
How to hault or freeze parent form when a 2d form is open in vb6 3 36
In a recent article here at Experts Exchange (, I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now