If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Command Button Failure...
For some reason when I try to creat a command button on my form it gives a beep and displays the following message: "Object variable or with block variable not set" It also doesn't allow me to continue, so I'm stuck until I figure out what's wrong... Any ideas? Thanks! |
#2
|
|||
|
|||
Command Button Failure...
Usually that's a problem with your VB code; often referring to a
recordset that has been closed or not opened yet. Does the error message give you an option to debug? John Heidelberg wrote: For some reason when I try to creat a command button on my form it gives a beep and displays the following message: "Object variable or with block variable not set" It also doesn't allow me to continue, so I'm stuck until I figure out what's wrong... Any ideas? Thanks! |
#3
|
|||
|
|||
Command Button Failure...
Thanks for responding so quickly!
No options are given to debug... just the beep and message! The problem is that it also freezes any progress on that form... What should I be looking for in the VB? Heidelberg "J. Goddard" wrote: Usually that's a problem with your VB code; often referring to a recordset that has been closed or not opened yet. Does the error message give you an option to debug? John Heidelberg wrote: For some reason when I try to creat a command button on my form it gives a beep and displays the following message: "Object variable or with block variable not set" It also doesn't allow me to continue, so I'm stuck until I figure out what's wrong... Any ideas? Thanks! |
#4
|
|||
|
|||
Command Button Failure...
Hi -
check for references to a recordset (rst.movefirst, rst.BOF, rst!fieldname, etc) that occur either before the recordset has been opened with set rst=db.openrecordset OR after the recordet has been closed with rst.close . or You will also get this error if when you execute rst=db.openrecordset, the db object has not yet been defined with set db=.... OR has been released with set db = Nothing OR You are using a "With" type of syntax (.movefirst, .EOF, .fieldname) without having used "with rst" first: With rst .. .. .. End With These are the commonest situations I have encountered; there may be others. If you don't find the problem, post the code that runs when the command button is clicked. John Heidelberg wrote: Thanks for responding so quickly! No options are given to debug... just the beep and message! The problem is that it also freezes any progress on that form... What should I be looking for in the VB? Heidelberg "J. Goddard" wrote: Usually that's a problem with your VB code; often referring to a recordset that has been closed or not opened yet. Does the error message give you an option to debug? John Heidelberg wrote: For some reason when I try to creat a command button on my form it gives a beep and displays the following message: "Object variable or with block variable not set" It also doesn't allow me to continue, so I'm stuck until I figure out what's wrong... Any ideas? Thanks! |
Thread Tools | |
Display Modes | |
|
|