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 "0" <= Mid(StringIn, I, 1) And Mid(StringIn, I, 1) <= "9" Then
WorkingString = WorkingString & Mid(StringIn, I, 1)
End If
Next
'Use Val() to convert it to a number.
NumericValue = Val(WorkingString)
End Function
The "event procedure" associated with the second button reads:
Private Sub DoReport_Click()
On Error GoTo Err_Primary_Classification_Click
If IsNull(Acronym) Then
MsgBox "Please choose a Primary Classification.", vbOKOnly, "No Primary Classification!"
Exit Sub
Else
ReportTitle = DLookup("[Primary Classification Title]", "Classifications, Primary", "[Primary Classification Acronym] = '" & Acronym & "'"
DisplayPrimaryClassification = False
DoCmd.OpenReport "ScheduleReport", acViewPreview, , "[Reference Number] Like " & Chr(34) & "*" & Acronym & "*" & Chr(34)
End If
Exit_Primary_Classification_Click:
Exit Sub
End Sub
The error for the second button reads: "Compile Error: Can't find project or library." When I select "OK", I am dropped into a code window, with an the first "chr" of the "else" statement of the following code highlighted.
Private Sub DoReport_Click()
On Error GoTo Err_Primary_Classification_Click
If IsNull(Acronym) Then
MsgBox "Please choose a Primary Classification.", vbOKOnly, "No Primary Classification!"
Exit Sub
Else
ReportTitle = DLookup("[Primary Classification Title]", "Classifications, Primary", "[Primary Classification Acronym] = '" & Acronym & "'"
DisplayPrimaryClassification = False
DoCmd.OpenReport "ScheduleReport", acViewPreview, , "[Reference Number] Like " & Chr(34) & "*" & Acronym & "*" & 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?
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 "0" <= Mid(StringIn, I, 1) And Mid(StringIn, I, 1) <= "9" Then
WorkingString = WorkingString & Mid(StringIn, I, 1)
End If
Next
'Use Val() to convert it to a number.
NumericValue = Val(WorkingString)
End Function
The "event procedure" associated with the second button reads:
Private Sub DoReport_Click()
On Error GoTo Err_Primary_Classification_Click
If IsNull(Acronym) Then
MsgBox "Please choose a Primary Classification.", vbOKOnly, "No Primary Classification!"
Exit Sub
Else
ReportTitle = DLookup("[Primary Classification Title]", "Classifications, Primary", "[Primary Classification Acronym] = '" & Acronym & "'"
DisplayPrimaryClassification = False
DoCmd.OpenReport "ScheduleReport", acViewPreview, , "[Reference Number] Like " & Chr(34) & "*" & Acronym & "*" & Chr(34)
End If
Exit_Primary_Classification_Click:
Exit Sub
End Sub
The error for the second button reads: "Compile Error: Can't find project or library." When I select "OK", I am dropped into a code window, with an the first "chr" of the "else" statement of the following code highlighted.
Private Sub DoReport_Click()
On Error GoTo Err_Primary_Classification_Click
If IsNull(Acronym) Then
MsgBox "Please choose a Primary Classification.", vbOKOnly, "No Primary Classification!"
Exit Sub
Else
ReportTitle = DLookup("[Primary Classification Title]", "Classifications, Primary", "[Primary Classification Acronym] = '" & Acronym & "'"
DisplayPrimaryClassification = False
DoCmd.OpenReport "ScheduleReport", acViewPreview, , "[Reference Number] Like " & Chr(34) & "*" & Acronym & "*" & 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?