Amanda-
Perhaps temporarily add a MsgBox to your code to find out if the event is
even firing. I don't see anything wrong with the code.
BTW, are you compiling and saving your .accdb VBA project before you create
the .accde? There can be no compile errors in a .accde or it won't work
right.
You say the "master" works OK. Does it work OK if you copy it to the
machine that's having the problems? It could be a library missing failure
on the machine.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Amanda B
Sent: Wednesday, June 19, 2013 5:47 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Split Database Issue 2- text-link is not calling
report
I posted a couple of weeks ago- we started having corruption problems with
our Access database, so I followed recommended procedures for creating a
front end file on the local pcs, and a table file on the shared server.
The setup now consists of 3 files: a file on the server with the backend of
the database, a "master" file on the server that is still combined- with
forms and linked tables (linked to the same backend file, used to make
design changes), and a locked .accde copy of a front end file on each user
pc.
I'm continuing to have three problems since this split. All three problems
are not issues with the master file- it works just fine. The second is
described below (I'll write up the others in separate posts)
2. One of my forms is designed to build a query based on selections in a
form, then call the appropriate report when text-link is clicked. But when
I click the text link in the front end accde, nothing happens.
Here is the code from one of the text-links:
Private Sub Label_AJ_Report_Click()
On Error GoTo Err_Label_AJ_Report_Click
Dim strWhere As String
Dim IngLen As Long
Const conJetDate = "\#mm\/dd\/yyyy\#"
strWhere = ""
strDesc = "Date Range: "
If Not IsNull(Me.AJ_Start_Date) Then
strWhere = "([AJ Date] >=" & Format(Me.AJ_Start_Date,
conJetDate) & ") AND "
strDesc = strDesc & Me.AJ_Start_Date
End If
strDesc = strDesc & " - "
If Not IsNull(Me.AJ_End_Date) Then
strWhere = strWhere & "([AJ Date] <=" & Format(Me.AJ_End_Date,
conJetDate) & ") AND "
strDesc = strDesc & Me.AJ_End_Date
End If
strDesc = strDesc & vbCrLf & "Species: "
If Not IsNull(Me.Species_Name) Then
strWhere = strWhere & "([Species ID]= " & Me.Species_Name & ") AND
"
strDesc = strDesc & Me.Species_Name.Column(1)
Else
strDesc = strDesc & "All Species"
End If
strDesc = strDesc & vbCrLf & "Animal Name: "
If Not IsNull(Me.Animal_Name) Then
strWhere = strWhere & "([Animal ID]= " & Me.Animal_Name & ") AND "
strDesc = strDesc & Me.Animal_Name.Column(1)
Else
strDesc = strDesc & "All Animals"
End If
strDesc = strDesc & vbCrLf & "Entry Type: "
If Not IsNull(Me.Entry_Type) Then
strWhere = strWhere & "([AJ Type]= """ & Me.Entry_Type & """) AND "
strDesc = strDesc & Me.Entry_Type
Else
strDesc = strDesc & "All Entries"
End If
strDesc = strDesc & vbCrLf & "Population: "
If (Me.Combo_Population) = "Current Animals" Then
strWhere = strWhere & "([Enclosure] is not Null) AND "
strDesc = strDesc & Me.Combo_Population
ElseIf (Me.Combo_Population) = "Previous Animals Only" Then
strWhere = strWhere & "([Enclosure] is Null) AND "
strDesc = strDesc & Me.Combo_Population
Else
strDesc = strDesc & "All Animals"
End If
strDesc = strDesc & vbCrLf & "Enclosure Section: "
If Not IsNull(Me.Combo_Enclosure) Then
strWhere = strWhere & "([Enclosure]LIKE """ & Me.Combo_Enclosure &
"*"") AND "
strDesc = strDesc & Me.Combo_Enclosure & ", " &
Me.Combo_Enclosure.Column(2)
Else
strDesc = strDesc & "All Enclosures"
End If
IngLen = Len(strWhere) - 5
If IngLen <= 0 Then
strWhere = ""
Else
strWhere = Left$(strWhere, IngLen)
Me.Filter = strWhere
Me.FilterOn = True
End If
Debug.Print strDesc
stDocName = "Animal- Journal Report"
DoCmd.OpenReport stDocName, acViewPreview, , strWhere, acWindowNormal,
strDesc
Exit_Label_AJ_Report_Click:
Exit Sub
Err_Label_AJ_Report_Click:
MsgBox Err.Description
Resume Exit_Label_AJ_Report_Click
End Sub
I have tried decompiling and recompiling- nada
Suggestions to making this code correct enough to work in the accde?
Thanks, Amanda
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar