Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User-Control problem

Status
Not open for further replies.

BaDi

Programmer
May 14, 2002
32
NL
Hi!

I have an own made user-control.
One of the properties that have been added to this user control are: DisabledPicture, DownPicture and Picture.

Now without not doing anything special, just switching from my user control code to my form, the application says: Runtime Error '424':

Object required

And then when I debug the user control the error refers to these properties I earlier mentioned.

Now I have do remove them before I can get back into my form.. and at the same time offcourse it kicks out the pictures I allready had set.

This has worked normally.. until now.

Any help is very welcome!

Thanx in advance!
 
Be sure to close the "designer" window of the user control before doing anything else. Also realize that parts of your code ((ReadProperties)) run at design time in the IDE as well as at run-time. You must check Ambient.UserMode=false to avoid running code in the IDE that should only run at run-time. Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
I have the following piece of code attempting to update an Access field:

While Not rst.EOF
If rst![CASEUPC] Is Null Then
valueA = rst![CASEUPC]
.Edit
rst![chkCASEUPC] = StripString(valueA)
.Update
End If
.MoveNext
Wend

When I run this, I get a "Run-Time error: '424' Object Required" error on the If statement.

I seem to have had brain fade here. Can anyone see the problem?
 

The object variable "rst" is not set anymore, or never was.

Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset

rst.Open SqlString, conn

If the rst was never opened, or has been set to Nothing somewhere, or has gone out of scope, you will get this error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top