Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unrecognized database format

Status
Not open for further replies.

robinsql

Programmer
Aug 2, 2002
236
IE
Hi all,

I've come across quite a strange problem on one of the locations I have installed my software.
I have four client machines looking at an Access 2000 DB on a server, each running my VB application.
When the user tries to run one of the Access reports from his machine, it seems to damage the DB. He closes down the app on all machines, goes to the server and tries to open the database but is told that he must repair the DB in order to open it.
The report runs fine from any other machine I've used it on.
Here is the code I am using...

Set objAccess = CreateObject("Access.Application")

With objAccess
.OpenCurrentDatabase strDBDir, False
.DoCmd.OpenReport "rptAbsentPupilsByDate", acViewDesign
.Reports(0).RecordSource = sSQL
.DoCmd.OpenReport "rptAbsentPupilsByDate", acViewPreview
.Visible = True
.DoCmd.Maximize
.CommandBars("Menu Bar").Enabled = False
.CommandBars("Print Preview").Enabled = True
.CommandBars("Print Preview").Controls("View").Visible = False
.CommandBars("Print Preview").Controls("Database Window").Visible = False
.CommandBars("Print Preview").Controls("Office Links").Visible = False
.CommandBars("Print Preview").Controls("New Object").Visible = False
.CommandBars("Print Preview").Controls("Microsoft Access Help").Visible = False
End With


Has anyone got any idea what could be causing this?
Thanks for any help,
Robin
 
Before you start doubting your code, check the PCs. They're on the same LAN, but are they on the same OS and version? Are they all using Access XP or 2000? Make sure there isn't anything that's different on that PC than the others.

Jim DeGeorge [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top