Doug Murphy
dw-murphy at cox.net
Tue Dec 9 10:54:07 CST 2008
Folks,
We distribute an application as an Access 2002 runtime. The installation is
done with Wise/Sagekey. We have many copies of the application out. One of
our clients just installed the application and is getting an Access vba
error 3043 "Disk or Network Error". This is a front/back end application
and both are on the same computer in the same folder. After the first report
of the problem I thought is was a bad installation so logged onto the
customers computer remotely, did a complet un-install of the application and
runtime and with a new installationg file re-installed it. Still get the
error. The location of the error indicates that the relinker has run and we
are looking at the computers location settings to set our date, currency and
address masks to match. The routine that is breaking follows. We have not
seen this problem before and I am wondering if there could be a dll
coruption, or missing somewhere. The operating system is Windows XP.
I look forward to your thoughts.
Doug
Code follows: (tFM is a user defined type declared at the module level)
Public Sub GetCountrySettings()
Dim rs As DAO.Recordset
Dim db As DAO.Database
Dim sSQL As String
Dim sCountrySettings As String
Dim fld As Field
Dim LCID As Long
LCID = 0 'GetSystemDefaultLCID()
On Error GoTo GetCountrySettings_Error
sCountrySettings = GetUserLocaleInfo(LCID, LOCALE_SCOUNTRY)
tFM.sCountry = sCountrySettings
If Not IsNull(sSQL) Then
sSQL = "Select * From tblUserFormat Where fldCountry = '" &
sCountrySettings & "'"
Set db = CurrentDb
Set rs = db.OpenRecordset(sSQL, dbOpenForwardOnly)
For Each fld In rs.Fields
Select Case fld.Name
Case "fldDateMask"
tFM.sDateMask = fld.Value & ""
Case "fldDateFormat"
tFM.sDateFormat = fld.Value & ""
Case "fldPhoneMask"
tFM.sPhoneMask = fld.Value & ""
Case "fldPhoneFormat"
tFM.sPhoneFormat = fld.Value & ""
Case "fldTimeMask"
tFM.sTimeMask = fld.Value & ""
Case "fldTimeFormat"
tFM.sTimeFormat = fld.Value & ""
Case Else
End Select
Next
Else
'Leave as is
End If
GetCountrySettings_Exit:
On Error GoTo 0
Set rs = Nothing
Exit Sub
GetCountrySettings_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure GetCountrySettings of Module basInternational"
Resume GetCountrySettings_Exit:
End Sub