Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Bradford, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Defining a recordset (Access 97)

    I would like to open a specific table within my database and update the fields. The data will come from an unbound form and I would like the update to take place as part of an event procedure after the user has clicked the button.

    I would appreciate some help in how to define my recordset

    Many thanks
    Mich

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Defining a recordset (Access 97)

    The recordset need be nothing more than an SQL statement, something like "Select * from myTable WHERE ....". The nature of the where clause would select only the record for the currently displayed information. If no such record exited, then the recordset would be empty.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Bradford, Yorkshire, England
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Defining a recordset (Access 97)

    Thanks for that Mark

    Could I also use this to add new records to the table?

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Defining a recordset (Access 97)

    Yes you can. I'd do the same thing to create that recordset. If the resultant recordset is empty, then you know you have to do a .AddNew rather than a .Edit. Other than that, code is same.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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