Microsoft Access Data Manipulation tutorials
A Recordset object usually has a current position, most often at a record. When you refer to the fields in a Recordset, you obtain values from the record at the current position, which is known as the current record. However, the current position can also be immediately before the first record in a Recordset or immediately after the last record. In certain circumstances, the current position is undefined. Describes how to use the Move methods to navigate a recordset.
Related Tutorials
How to: Detect the Limits of a DAO Recordset
In a Recordset object, if you try to move beyond the beginning or ending record, a run-time error occurs. Learn how to use the BOF and EOF properties to avoid run-time erros when moving through a recordset.
How to: Work With Attachments In DAO
In DAO, Attachment fields function just like other multi-valued fields. The field that contains the attachment contains a recordset that is a child to the table's recordset. Learn how to load and save attachments in a recordset.
How to: Extract Data from a Record in a DAO Recordset
After you have located a particular record or records, you may want to extract data to use in your application instead of modifying the underlying source table. Learn several techniques for extracting data from a DAO Recordset.
How to: Manipulate Multivalued Fields With DAO
Multivalued fields are represented as Recordset objects in DAO. The recordset for a field is a child of the recordset for the table that contains the multivalued field. Learn how to manipulate records in multivalued fields.
How to: Delete a Record From a DAO Recordset
Learn how to delete a record from a DAO recordset.
How to: Sort Data in a DAO Recordset
Unless you open a table-type Recordset object and set its Index property, you cannot be sure that records will appear in any specific order. However, you usually want to retrieve records in a specific order. Learn how to sort data in a recordset.
How to: Make Bulk Changes to a DAO Recordset
After you have created a table-type or dynaset-type Recordset object, you can change, delete, or add new records. You cannot change, delete, or add records to a snapshot-type or forward-only-type Recordset object. Learn how to efficiently make bulk updates to a recordset.
How to: Mark a Position in a DAO Recordset
A bookmark is a system-generated Byte array that uniquely identifies each record. Learn how to use the Bookmark property to mark a record in a recordset.
How to: Modify a Query from a DAO Recordset
You can use the Requery method on a dynaset-type or snapshot-type Recordset object when you want to run the underlying query again after changing a parameter. Learn how to modify a query's parameters using Access SQL.
How to: Use Transactions in a DAO Recordset
A transaction is a set of operations bundled together and treated as a single unit of work. The work in a transaction must be completed as a whole; if any part of the transaction fails, the entire transaction fails. Transactions offer the developer the ability to enforce data integrity. With multiple database operations bundled into a single unit that must succeed or fail as a whole, the database cannot reach an inconsistent state. Transactions are common to most database management systems. Learn how to use transactions in a DAO recordset.
How to: Find a Record in a Table-Type DAO Recordset
Describes how to use the Seek method to locate a record in a table-type recordset.
How to: Find the Current Position in a DAO Recordset
In some situations, you need to determine how far through a Recordset object you have moved the current record position, and perhaps indicate the current record position to a user. Learn how to find the current position in a recordset.
How to: Count the Number of Records in a DAO Recordset
You may want to know the number of records in a Recordset object. Learn how to count the umber of records in a Recordset object.
How to: Change Tables Involved in a One-to-Many Relationship in a DAO Recordset
Dynaset-type Recordset objects can be based on a multiple-table query containing tables with a one-to-many relationship. Learn how to freely change the values on the "one" side of a one-to-many relationship.
How to: Add a Record to a DAO Recordset
Learn how to add a new record to a table-type or dynaset-type Recordset.
How to: Track Design Changes to a Table-Type DAO Recordset
You may need to determine when the underlying TableDef object of a table-type Recordset was created, or the last time it was modified. Learn how to determine when a table was created or last updated.
How to: Find a Record in a Dynaset-Type or Snapshot-Type DAO Recordset
Learn how to use the Find methods to locate records in a dynaset-type or snapshot-type recordset.
How to: Create a DAO Recordset From a Table In the Current Database
Learn how to create a Recordset object for a table in the current database.
Using the Recordset with MS Access and ADO
A Connection object may give you access to the database, but that's only half the equation; the Recordset object gives you access to the data. Keep reading to learn more about the Recordset. TOC: Using the Recordset with MS Access and ADO; The Recordset Object, Properties, Methods and events; Write code to Open ADODB connection, Recordset and close open objects; Review recordset properties using code.
How to: Create a DAO Recordset From a Form
You can create a Recordset object based on an Access form. Learn how to create a Recordset object based on an Access form.
How to: Modify an Existing Record in a DAO Recordset
Learn how to use the Edit and Update methods to modify records.
How to: Create a DAO Recordset From a Query
You can create a Recordset object based on a stored select query. Learn how to create a Recordset object based on a stored select query.
How to: Bind a Form to an ADO Recordset
Describes how to set a form's Recordset property to an open ADO Recordset object.
How to: Read From and Write To a Field in a DAO Recordset
Describes how to use the Value property of a field to read or write data to a record.
How to: Return a Random Record from a DAO Recordset
Microsoft Access does not have a built-in mechanism for returning a random record from a set of records. This topic describes a sample user-defined function that you can use to return a random record.
Introduction to Record Sets
Topics: The Type of Recordset Objects, Creating a Recordset Object, Characteristics of a Record Set, Opening a Record Set, Record Navigation in a Record Set, The Fields of a Recordset.
Print a report using a filtered recordset
I am trying to print a report for each record I got using the Filter On. I got 5 out of 10 records in my recordset, and I would like to print a report for each record. I have a button "print report" and this is the code: Dim MyReport As Report MyReport.Name = "Emp Acknowledgement" MyReport.Recordset = Me.Recordset MyReport.Print I am getting error: "Object Variable or With Block Variable not set" I'm new in Access, and I prefer the Filter becuase it allows me to do a search by entering values in multiple fields on one form at a time.
ADO and DAO Library References in Access Databases
Access 2000 and 2002 do not include a reference, by default, to the DAO 3.6 Object Library. Instead, Microsoft has included the ADO 2.1 Object Library as the default library for data access in Access 2000 and 2002. This means that if you create a new database in Access 2000 or 2002 and then use VBA code which includes the commonly used Database object, the code will fail. The Database object is not the only object where this problem is likely to occur. TableDef, QueryDef, Workspace, User, Group, and Container objects, as well as their Collection objects, are also commonly used in VBA code to customize database applications. However, without a reference set to the DAO object library, any code that uses these objects will also fail. Microsoft finally listened to the screams of its customers on this issue, so the DAO library is returned to being a default checked reference in new databases created with Access 2003. By default, the DAO reference has a higher priority than the ADO library in Access 2003.
From DAO to ADO
When you migrate Access data to SQL Server, you have two choices with Access 2000 and only one with other versions. With previous versions of Access, you will link SQL Server tables, using ODBC, to your Access database. With Access 2000, you can either link the table using ODBC or decide to take profit of the new Access Project file (.adp) using OLE-DB. In the link option, your Access-VBA code remains in DAO, but need to be adapted to the newly ODBC-linked tables. In the project option, you DAO code needs to be modified in ADO.
DAO (Data Access Objects) Object Model
Overview of the objects in the DAO tree (Data Access Objects.) Useful for working with the objects in a Microsoft Access database programmatically.
Field type reference - names and values for DDL, DAO, and ADOX
You can create and manage tables in Access using: * the interface (table design view); * Data Definition Language (DDL) query statements; * DAO code; * ADOX code. Each approach uses different names for the same field types. This reference provides a comparison.
Using a Recordset Clone for Quick Searches
I will teach you how to Use a Recordset Clone for Quick Searches. (video tutorial)
Move between records or fields
Learn: Move between records by using navigation buttons in a datasheet or form, Move between records by using navigation buttons on a data access page, Move between fields with the Go To Field box in Datasheet view.
Basic Queries Using QBE
Learning objectives: Do queries contain any data? How do I create a query? What can I do with a query? How do I create a calculated field? Why does Access add square brackets around field names? What names should I give the queries I create? What does the ampersand operator (&) do? What is a non-updatable recordset? How do I tell whether a query results in a nonupdatable recordset? (pdf file, install Acrobat Reader to read this tutorial.)
Server-side data access using ADO
Learning objectives: understand how ACTIVEX DATA OBJECTS can be used to create dynamic web content; create ADO Connection, Command, and Recordset objects; display records from Recordset object; use ADO to "up-size" a web-based application; use database look-up for user authorization; modify values in a database using an HTML form. (pdf file, install Acrobat Reader to read this tutorial)
How to: Set Properties of Data Access Objects in Visual Basic
Data Access Objects (DAO) enable you to manipulate the structure of your database and the data it contains from Visual Basic. Describes how to set properties for DAO objects.
Developing Access 2007 Solutions with Native C or C++
Learn about the architecture of Microsoft Office Access 2007, its new ACE engine and features, and find out what things you should consider when choosing the most optimal native data access API for your new or legacy database solution. Get started quickly developing C or Microsoft Visual C++ 2008 solutions for Access databases. This article provides insight about Access, its ACE engine, and the mechanisms that are used work with it, regardless of whether you are writing native code. It shows you how to develop Access solutions in C/C++, and describes the data stack used by Access and some of the different components of the engine. By using data access APIs such as DAO, OLE DB, ADO, or ODBC, you can continue to create custom Access solutions for the most complex scenarios. As the default provider for the ACE engine, the Direct DAO driver provides the most comprehensive native interface to Access databases in general. It not only integrates well with the ACE Engine, but it is also fast, stable and backward-compatible with the older file formats. As such, DAO is the recommended data access API when developing your Access solutions.
Copy or move data
Learn: Copy or move data from one field to another, Copy or move records from another application to Microsoft Access, Copy or move records or data from multiple fields in Microsoft Access to another application, Copy or move records or data from multiple fields to a datasheet, Copy or move records or data from multiple fields to a form.
Forms how tos
How to add buttons to a custom command bar. How to change the number of Undo Levels. How to filter a form from an item selected in a combo box. How to pause execution of code in the current form until another form closes. How to use a form to update records from a table in a remote database, without linking to that table or writing VBA code for an ADO or a DAO connection. How to use a form to update records from a table in a remote database with a database password, without linking to that table or writing VBA code for an ADO or a DAO connection, and hide that password from the user. What the Revert item on the File menu is for.
Move the tables in an Access database to a SharePoint site and link to them
If you have data in a Microsoft Office Access 2007 database, you can share it as lists on a Microsoft Windows SharePoint Services 3.0 site, where team members can interact with it. They can share and manage the content by using the features of a SharePoint site while they continue to use forms, reports, and queries from Access. In this article * Overview * How data is moved * Use the Move to SharePoint Site Wizard * Limitations of migration * Move to SharePoint feature is unavailable when you use earlier database file formats
 
Categories