G
Guest
Hi all,
I'm trying to filter records in a form based on a selection in a combo box.
In the after_update event of the combo box, I have:
________________
Private Sub cmbFilterFileType_AfterUpdate()
On Error GoTo cmbFilterFileType_AfterUpdate_Error
If Forms!Issues!cmbFilterFileType = "All" Then
DoCmd.ShowAllRecords
End If
If Forms!Issues!cmbFilterFileType = "Case" Then
DoCmd.ApplyFilter "", "[FileTypeID] = 1"
End If
If Forms!Issues!cmbFilterFileType = "Issue" Then
DoCmd.ApplyFilter "", "[FileTypeID] = 2"
End If
Exit_cmbFilterFileType_AfterUpdate:
Exit Sub
cmbFilterFileType_AfterUpdate_Error:
Call ErrorLog(Err.Description, Err.Number, Me.Name)
__________________
If I choose "All", it will requery and pull all the records....fine.
However, if I choose either of the other options, I get an access popup
window that says "Enter Parameter Value" with the following prompt text:
Open Issues.cmbRequestingParty
"Open Issues" is the query that the form is bound to, and there IS a control
on the form named 'cmbRequestingParty', but I have no idea why it's asking me
for a value for that. All I'm trying to do is filter out the records based
on a value with a different name that displays in a different control.
I've looked at the query and I don't see anything wrong with it. I've been
using it for months now and it's never had any problems and all I did was add
a small table to populate the new cmbFileType control but I've looked at the
query in both sql and design mode and I don't see any reason for it to ask me
for this value.
Any ideas?
Thanks,
CW
I'm trying to filter records in a form based on a selection in a combo box.
In the after_update event of the combo box, I have:
________________
Private Sub cmbFilterFileType_AfterUpdate()
On Error GoTo cmbFilterFileType_AfterUpdate_Error
If Forms!Issues!cmbFilterFileType = "All" Then
DoCmd.ShowAllRecords
End If
If Forms!Issues!cmbFilterFileType = "Case" Then
DoCmd.ApplyFilter "", "[FileTypeID] = 1"
End If
If Forms!Issues!cmbFilterFileType = "Issue" Then
DoCmd.ApplyFilter "", "[FileTypeID] = 2"
End If
Exit_cmbFilterFileType_AfterUpdate:
Exit Sub
cmbFilterFileType_AfterUpdate_Error:
Call ErrorLog(Err.Description, Err.Number, Me.Name)
__________________
If I choose "All", it will requery and pull all the records....fine.
However, if I choose either of the other options, I get an access popup
window that says "Enter Parameter Value" with the following prompt text:
Open Issues.cmbRequestingParty
"Open Issues" is the query that the form is bound to, and there IS a control
on the form named 'cmbRequestingParty', but I have no idea why it's asking me
for a value for that. All I'm trying to do is filter out the records based
on a value with a different name that displays in a different control.
I've looked at the query and I don't see anything wrong with it. I've been
using it for months now and it's never had any problems and all I did was add
a small table to populate the new cmbFileType control but I've looked at the
query in both sql and design mode and I don't see any reason for it to ask me
for this value.
Any ideas?
Thanks,
CW