PDA

Click to See Complete Forum and Search --> : Empty table and recordset


gerard
Sep 19th, 2000, 08:38 AM
Not sure if I can explai this issue. I have a application that when the users first set it up will have a number of empty tables. I'm using ADO recordsets to access this tabl, but I keep getting errors such as "object varible or with block not set" Thsi occurs when I go to run the following code:

With Adodc2.Recordset
If Not (.BOF And .EOF) 'Then ...error occurs here the recordeset is based upon a empty table
mvBookMark = .Bookmark
End If

.AddNew
mbAddNewFlag = True
End With
If it an issue with the empty table or should I be looking at something else?

Gerard

Sep 19th, 2000, 09:16 AM
It's not an issue of the empty table, you must look for something else.
object isn't set requires the object to be set first before you can use it.
If the tables exists then there should be no problem,altough I don't know how UR trying to use this control.

bar
Sep 19th, 2000, 09:25 AM
Gerard,

This normally happens when you try to access the data control in your Form_Load event. If you are, just move the code to the Form_Activate event, and make sure that you only execute it the first time that the activate event fires.