Results 1 to 4 of 4

Thread: Database Problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    31
    How can I have a database load to a new record.

    If I place the following line in a button event it adds a new record as it should.

    Data1.Recordset.AddNew

    But if it is placed in the load event I get the following error.

    "Object variable or With block variable not set"

    I am guessing it is because the data has not been loaded prior to the command in the load event.

    Is there a way that I can "preload" the data before executing the Data1.Recordset.AddNew command?

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Try adding it to the Form_Activate event handler

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    31
    Thanx a Million.

    I knew it had to be easy and I was missing something.

  4. #4
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    no prob....

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