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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97 Database Problem

Status
Not open for further replies.

Archives

Technical User
Feb 17, 2003
2
US
I am experiencing a problem in an Access 97 database that was developed using a computer working on a network but using client based software. Specifically, the database works as programmed so long as it is activated on a network connected computer. All of the computers are using Access 97 based on the client not on the network. When the database is copied to a CD and a non-networked computer is used to open the database, error messages appear when two of the buttons are selected.

The "event procedure" associated with the first button reads:

Private Sub Classifications_Click()
DoCmd.OpenReport "ClassificationsReport", acViewPreview
End Sub

The error for the first button reads: "Compile Error: Can't find project or library." When I select "OK", I am dropped into the Global Module, with an the first "Mid" of the 8th line of the following code highlighted.

Function NumericValue(StringIn) As Integer
Dim WorkingString As String
WorkingString = " " 'Initialize with blank space, which Val() ignores
Dim I As Integer

'Strip out all non-numeric characters
For I = 1 To Len(StringIn)
If &quot;0&quot; <= Mid(StringIn, I, 1) And Mid(StringIn, I, 1) <= &quot;9&quot; Then
WorkingString = WorkingString & Mid(StringIn, I, 1)
End If
Next

'Use Val() to convert it to a number.
NumericValue = Val(WorkingString)
End Function


The &quot;event procedure&quot; associated with the second button reads:

Private Sub DoReport_Click()
On Error GoTo Err_Primary_Classification_Click

If IsNull(Acronym) Then
MsgBox &quot;Please choose a Primary Classification.&quot;, vbOKOnly, &quot;No Primary Classification!&quot;
Exit Sub
Else
ReportTitle = DLookup(&quot;[Primary Classification Title]&quot;, &quot;Classifications, Primary&quot;, &quot;[Primary Classification Acronym] = '&quot; & Acronym & &quot;'&quot;)
DisplayPrimaryClassification = False
DoCmd.OpenReport &quot;ScheduleReport&quot;, acViewPreview, , &quot;[Reference Number] Like &quot; & Chr(34) & &quot;*&quot; & Acronym & &quot;*&quot; & Chr(34)
End If

Exit_Primary_Classification_Click:
Exit Sub

End Sub


The error for the second button reads: &quot;Compile Error: Can't find project or library.&quot; When I select &quot;OK&quot;, I am dropped into a code window, with an the first &quot;chr&quot; of the &quot;else&quot; statement of the following code highlighted.

Private Sub DoReport_Click()
On Error GoTo Err_Primary_Classification_Click

If IsNull(Acronym) Then
MsgBox &quot;Please choose a Primary Classification.&quot;, vbOKOnly, &quot;No Primary Classification!&quot;
Exit Sub
Else
ReportTitle = DLookup(&quot;[Primary Classification Title]&quot;, &quot;Classifications, Primary&quot;, &quot;[Primary Classification Acronym] = '&quot; & Acronym & &quot;'&quot;)
DisplayPrimaryClassification = False
DoCmd.OpenReport &quot;ScheduleReport&quot;, acViewPreview, , &quot;[Reference Number] Like &quot; & Chr(34) & &quot;*&quot; & Acronym & &quot;*&quot; & Chr(34)
End If

Exit_Primary_Classification_Click:
Exit Sub

Err_Primary_Classification_Click:
MsgBox Err.Description
Resume Exit_Primary_Classification_Click

End Sub


I want to re-emphasize that this program works fine so long as I am operating it on a network based computer that has Access 97 on the client not the server but when I place it on a non-networked based computer that has Access 97 fully loaded the error messages arise.


Any suggestions on how to address this problem?
 
This sounds like either a &quot;reference&quot; is missing or an Active X control is not registered.

My &quot;guess&quot; its an Active X. I had a similar problem when our netowrk people put a program on our computers and left the Active X on the network. The program worked fine as long as you were hooked to the network but most of the time we weren't.
 
Run the Access/Office97 service releases, SR-2b. Some of the VBA functions will not run until you do. I had a similar problem, see thread701-423687
 
Hi,
When you're in the code window, select &quot;Run --> Stop&quot; from the menu up top. then select &quot;Tools --> References&quot; from the menu. This will bring up a list of references and one (or more) will have &quot;MISSING: &quot; before the name. Which ones are listed as &quot;MISSING: &quot;. We'll find the easiest workaround for you. Kyle
 
Thaks for the help from everyone. I think I have solved the problem by changing the database from an MDB to an MDE file. That seems to have solved the problem. I am still doing more testing. It seems to work fine in Access 97 on non-networked computers now but I may have a continuing problem for users who are on more currernt versions of Access.

Archives
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top