Results 1 to 3 of 3

Thread: Empty table and recordset

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Angry

    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
    Live long and prosper...

  2. #2
    Guest

    Wink

    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.

  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    60
    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.
    Barend
    JHB-SA

    Nothing is impossible, except skiing through a revolving door.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width