473,378 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Runtime 424: Object Required on form.Show

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.
Aug 15 '07 #1
4 6383
kadghar
1,295 Expert 1GB
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.
it depends on the version of VB you are using, but i think this would work almost in every desk application. lets say you have in form1 something like

Expand|Select|Wrap|Line Numbers
  1. public function CallF2()
  2.      form2.show
  3. end function
and then you have in your module something like:

Expand|Select|Wrap|Line Numbers
  1. sub OpenF2()
  2.            form1.callf2
  3. end sub
and lets say you call the OpenF2 from a command on form1

Expand|Select|Wrap|Line Numbers
  1. private sub command1_click()
  2.      openf2
  3. end sub
This should show form2 when you click the command1

hope that helps
Aug 15 '07 #2
Killer42
8,435 Expert 8TB
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.
Are you sure you didn't just mistype the name of form2 or something?

Sorry if this sounds like a stupid beginner-oriented question, but it's surprising how often the really simple errors can trip you up. In fact, I'll even go so far as to mention here to beware that the Name of the form is not necessarily the same as the name of the form file. In other words, what is saved as form2 could be known to VB as "frmSomeMeaningfulName". (At least in VB6 this is the case - don't know about later versions.)
Aug 16 '07 #3
It was something stupid. The form itself had nothing to do with it. It was an object in the code on that form that wasn't declared correctly. In fact it was my logging object, which is what was leading me to believe that it was the form's fault since I wasn't seeing any logging.
Thanks for the help
Aug 16 '07 #4
Killer42
8,435 Expert 8TB
It was something stupid. The form itself had nothing to do with it. It was an object in the code on that form that wasn't declared correctly. In fact it was my logging object, which is what was leading me to believe that it was the form's fault since I wasn't seeing any logging.
Thanks for the help
Glad to see it's sorted.

I think it's important to remember, when debugging, that the problem is often what you assume it can't be.
Aug 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: filip stas | last post by:
How do i add references during runtime?
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
1
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
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'...
15
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
by: KRISHNA PRAVI | last post by:
the error is "runtime error object expected" here is the code....................................................................................... <script language="javascript"...
11
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: ...
3
by: gmazza via AccessMonster.com | last post by:
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 ...
6
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()
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.