•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 375,169 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,256 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser:
Views: 1871 | Replies: 0
![]() |
I'm trying to filter a subform based on combobox selection and getting a runtime error '424' - object required.
I downloaded the code from http://www.techonthenet.com/access/f...ilter_form.php and verified that it works in the provided sample database.
I copied the example and I'm getting the runtime error. I tried copying everything to a new form in case of form corruption with no results.
I've checked all the names of forms and controls as well.
The code breaks at form_frmReportSub.RecordSource = SQL as noted above.
I downloaded the code from http://www.techonthenet.com/access/f...ilter_form.php and verified that it works in the provided sample database.
I copied the example and I'm getting the runtime error. I tried copying everything to a new form in case of form corruption with no results.
I've checked all the names of forms and controls as well.
Option Compare Database
Const LSQL = "SELECT [Order].[Id], [Order].[SellingPrice], [Client].[CompanyName], [Job].[TakenBy], [Job].[Referral], [Order].[CompletionDate], [Order].[Total_Labour], [Order].[Total_Material] FROM (([Client] INNER JOIN [Order] ON [Client].[CustomerID] =[Order].[CustId]) INNER JOIN [Job] ON [Order].[Id] =[Job].[Order_Id])"
Dim SQL As String
Sub SetFilter()
SQL = LSQL & " where CustomerID = '" & cboEmp.Value & "'"
form_frmReportSub.RecordSource = SQL 'ERROR IS HERE
End Sub
Private Sub cboEmp_AfterUpdate()
'Call subroutine to set filter based on selected CustomerID
SetFilter
End SubThe code breaks at form_frmReportSub.RecordSource = SQL as noted above.
------------------------------------------------------------
ConnectNL Directory | NLTourist | Free eLearing Courses
ConnectNL Directory | NLTourist | Free eLearing Courses
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS Access and FileMaker Pro Marketplace
- Multi column combo box (VB.NET)
- combo box (PHP)
- Want to use radio button or menu bar instead of combo box (Java)
- combo box (ASP)
- How do I limit text char in Combo box? (VB.NET)
- combo box help (VB.NET)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: Linked SQL Server tables in MS Access
- Next Thread: Receive Email using Ms-Access and Outlook


Linear Mode