473,667 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Runtime error 424: Object required

Hi there,
I am a novice at Access programming but I am flustered by this error and
don't understand what I am doing wrong, any help is appreciated.
Here is my code:
Sub SetFilter()

Dim LSQL As String

LSQL = "select * from dbo_DDXLMO"
LSQL = LSQL & " where St_Offshore = '" & cboSelected & "'"

Form_frm_Offset Wells_sub.Recor dSource = LSQL

End Sub

I am calling the SetFilter routine from my Form_Open Procedure and all I have
is a form and subform and in the form I have an unbound combo box that
selects St_Offshore from table dbo_DDXLMO.
I am just trying to populate the subform with results from my combo box and I
keep getting this error and I have tried a million things and nothing is
working.
Please help, thanks!

--
Message posted via http://www.accessmonster.com

Jun 27 '08 #1
3 8258
gmazza via AccessMonster.c om wrote:
Hi there,
I am a novice at Access programming but I am flustered by this error and
don't understand what I am doing wrong, any help is appreciated.
Here is my code:
Sub SetFilter()

Dim LSQL As String

LSQL = "select * from dbo_DDXLMO"
LSQL = LSQL & " where St_Offshore = '" & cboSelected & "'"

Form_frm_Offset Wells_sub.Recor dSource = LSQL

End Sub

I am calling the SetFilter routine from my Form_Open Procedure and all I have
is a form and subform and in the form I have an unbound combo box that
selects St_Offshore from table dbo_DDXLMO.
I am just trying to populate the subform with results from my combo box and I
keep getting this error and I have tried a million things and nothing is
working.
Please help, thanks!
You might want to try the following format
Forms!MainFormN ame!SubFormName .Form.Recordsou rce = ...
or
Me("SubFormName ").Form.Records ource = ...

Brass
http://www.youtube.com/watch?v=1qdvz0uPpNk
Jun 27 '08 #2
Salad wrote:
>Hi there,
I am a novice at Access programming but I am flustered by this error and
[quoted text clipped - 18 lines]
>working.
Please help, thanks!

You might want to try the following format
Forms!MainFormN ame!SubFormName .Form.Recordsou rce = ...
or
Me("SubFormName ").Form.Records ource = ...

Brass
http://www.youtube.com/watch?v=1qdvz0uPpNk

I tried your suggestion and it now errors:
Access can't find the field (SubFormName) referred to in your expression.
Its not a field though, not sure what its talking about...
Thanks for the fast response.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200805/1

Jun 27 '08 #3
On May 12, 3:05*pm, "gmazza via AccessMonster.c om" <u37142@uwewrot e:
Salad wrote:
Hi there,
I am a novice at Access programming but I am flustered by this error and
[quoted text clipped - 18 lines]
working.
Please help, thanks!
You might want to try the following format
* *Forms!MainForm Name!SubFormNam e.Form.Recordso urce = ...
or
* *Me("SubFormNam e").Form.Record source = ...
Brass
http://www.youtube.com/watch?v=1qdvz0uPpNk

I tried your suggestion and it now errors:
Access can't find the field (SubFormName) referred to in your expression.
Its not a field though, not sure what its talking about...
Thanks for the fast response.

--
Message posted via AccessMonster.c omhttp://www.accessmonst er.com/Uwe/Forums.aspx/databases-ms-access/2008...
lol. Form_frm_Offset Wells_sub.form. RecordSource = LSQL
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
15310
by: Matt | last post by:
All parts of this application is written in VB 6.0. I have a dll on the server registered through COM+ and have exported it to a msi that's been installed on the workstation. Some of the time, the workstations run just fine. Then all of a sudden they aren't able to call a function on the server that they were previously able to call and they get error 424 (and sometimes it reboots the workstation). I know it has something to do with...
1
7204
by: mpmason14 | last post by:
i am trying to get the NotInList function working properly in MSAccess. my scenario is that i am trying to get it to add names to a combo list box if they aren't already in there. i gets to the point where the popup asks me if i want to add the user to the list. i click yes and i get "424 - object required". i have been looking on the internet for a few days now on how to resolve it, but no luck. hopefully someone here can help me. thanks in...
1
2125
by: astarti | last post by:
I am a newbie using VB. I am trying to send a number to the serial port using MSComm1 and 'error 424 object required' is appeared. What's wrong? Please help me ...
2
8274
by: ryanwood17 | last post by:
In my database, I have a search form in which I am trying to allow users to double click on an entry in the search form which will open another form to allow for edits. I am getting a Run-time '424' object required error. When debugging the code, it stops on the second line below. I would greatly appreciate any help. Thanks, Ryan. Private Sub LstSearchResults_DblClick(Cancel As Integer)
1
2520
by: manali1 | last post by:
I get a error Run time error 424 object required while writing a VBA script in MS access
4
6398
by: Matt Nunnally | last post by:
I have two forms and a module. The module has a method in which it calls a function in Form1. Within that function, I call form2.show (vbmodal) and I get this runtime error. Its driving me nuts. What am could be causing this? I also call form1.show vbmodal later on in that method of the module. That one has no problems. Any help would be extremely appreciated.
15
3880
towsie
by: towsie | last post by:
Hi, I am having a problem with code below, I am getting a runtime error 424: Object Required. The section of code in bold is where the error occurs. Any help would be greatly appreciated.
1
3705
by: Nilam2477 | last post by:
I'm invoking COM dll method from VB program. COM interface method takes one of the parameter as IUnknown as below HRESULT SetMethod( long samNumber, IUnknown* List); When i try to call this method from VB by passing "null" as the second parameter i get error "424 Object required." I dont want to create a new object. Why can't i pass null as the parameter? Is there any other way without creating object? Please help
11
6097
by: dougmeece | last post by:
Good Morning Experts, I spent all weekend working on this and got absolutely no where. I have a database with an input form that runs an append query to append to a table. Form Name: Poetry Append Query Name: Created_Submitted_Work Table Name: Created_Submitted
6
3510
by: jatin32 | last post by:
Hi, I have below code on Form_Load() , I get one time error when I open this form. 424 Object required, please help ASAP. Option Compare Database Private Sub Form_Load()
0
8458
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8366
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8565
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8650
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2779
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.