• Defining a recordset (Access 97)

    Author
    Topic
    #361839

    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

    Viewing 0 reply threads
    Author
    Replies
    • #548131

      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.

      • #548307

        Thanks for that Mark

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

        • #548334

          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.

    Viewing 0 reply threads
    Reply To: Defining a recordset (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: