K
Kim
I am new at access programming and slowly learnign my way - but I built an
application for a friend to run reports on some class/students related data
I sent her the db - and now she is having this error.
But when I run the app - i am not gettign the error...
Any ideas>? Thanks in Advance, Kim
I have a form with a combo box of class id's - I need to select the class in
the combo and then click on one of the buttons to run a report.
When I click this buitton I get the error: "run-time error 2136 - to set
this property , open the form or report in design view."
Here is the code behind it.
Private Sub cmdClassList_Click()
On Error GoTo Err_ClassListButton_Click
Dim stDocName As String
If IsNumeric(cmbClassDatesAll.Value) = True Then
' check if there are any participants for this class
If IsNull(DLookup("[orderDetailID]", "orderDetail", "[classdatesID] = "
& cmbClassDatesAll.Value)) Then
MsgBox ("There are no Participants Registered for this Class")
Else
stDocName = "classDates"
DoCmd.OpenReport stDocName, acPreview, , "classDates.classDatesID =
" & cmbClassDatesAll.Value
End If
Else
cmbClassDatesAll.SetFocus
MsgBox ("A class selection is required")
End If
Exit_ClassListButton_Click:
Exit Sub
Err_ClassListButton_Click:
MsgBox Err.Description
Resume Exit_ClassListButton_Click
End Sub
application for a friend to run reports on some class/students related data
I sent her the db - and now she is having this error.
But when I run the app - i am not gettign the error...
Any ideas>? Thanks in Advance, Kim
I have a form with a combo box of class id's - I need to select the class in
the combo and then click on one of the buttons to run a report.
When I click this buitton I get the error: "run-time error 2136 - to set
this property , open the form or report in design view."
Here is the code behind it.
Private Sub cmdClassList_Click()
On Error GoTo Err_ClassListButton_Click
Dim stDocName As String
If IsNumeric(cmbClassDatesAll.Value) = True Then
' check if there are any participants for this class
If IsNull(DLookup("[orderDetailID]", "orderDetail", "[classdatesID] = "
& cmbClassDatesAll.Value)) Then
MsgBox ("There are no Participants Registered for this Class")
Else
stDocName = "classDates"
DoCmd.OpenReport stDocName, acPreview, , "classDates.classDatesID =
" & cmbClassDatesAll.Value
End If
Else
cmbClassDatesAll.SetFocus
MsgBox ("A class selection is required")
End If
Exit_ClassListButton_Click:
Exit Sub
Err_ClassListButton_Click:
MsgBox Err.Description
Resume Exit_ClassListButton_Click
End Sub