Problem opening shared Access through excel

udigold1

New Member
Joined
Dec 15, 2008
Messages
45
Hi,
I have an Access DB on a network folder. I have an Excel file that connects to the DB using vba code.
Problem is whenever I'm opening the DB through Access, when other users trying to connect to the DB via excel they're getting the "data link properties" dialog and can't go on.
How can I solve it?

here's the vba code in excel:

Code:
[COLOR=#333333]
"OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;Password="""";User ID=Admin;Data Source=\\na02\data$\bakara\gemel\datain\DayDataIn1.accdb;Mode=Share Deny Write " _
        , _
        ";Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:En" _
        , _
        "gine Type=6;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB" _
        , _
        ":New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on" _
        , _
        " Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data=False;Jet OLEDB" _
        , _
        ":Bypass UserInfo Validation=False;Jet OLEDB:Limited DB Caching=False;Jet OLEDB:Bypass ChoiceField Validation=False" _[/COLOR]
Thanks,
Udi
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Is it an issue with your connection string? I've used something along these lines for years and has worked well.

Code:
Sub OpenTable()
Dim rs As Object, Conn$, str$


Set rs = CreateObject("ADODB.Recordset")
str = "\\na02\data$\bakara\gemel\datain\DayDataIn1.accdb;"
Conn = "Provider = Microsoft.ACE.OLEDB.12.0; Data Source=" & str


rs.Open Source:="Table1", Conn:=cn, CursorType:=2, LockType:=3
Range("A1").CopyFromRecordset rs, MaxColums:=1
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,048
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top