Post by David Johnso » Wed, 08 Oct 1997 04:00:00

Have a CDaoRecordSet dialog that updates an Access table.  When I change
one of the fields in the index and then MoveNext, I get the same record
that was just changed.

Example:  Key values (3 field key) were A-B-C
               Change third key field from C to D
               MoveNext returns the new A-B-D (which appears to the user as
if MoveNext was ignored)

Any ideas on how to work around this?
David G. Johnson
Homeworks Software


1. DAO/Indexes/Optional Fields

Can I have an optional field in a index to an Access table using DAO?

Have a three field index.  Field 3 is optional.  If not filled in when
storing via DAO, then Access sets the field to NULL.  When I seek on the
index I never get a hit.  Have figured out it never finds a match if the
third field has no value.  Did that by inserting a value in the third field
of the key & can get a hit.

When MFC-based CDaoRecordSet saves the record with no value in third key
field, Access sets the field to NULL.  Even if I try to set it to an empty
string.  I've added this type of record via Access, with Access's "default
value" set on the third key field to an empty string - it works.  But the
same record, saved via MFC DAO gets a NULL.

Situation:  Index for one record = A-B
                Index for next record = A-B-C
                Index for next record = A-B

Any ideas how to program around this or correctly handle?

David G. Johnson
Homeworks Software

2. ODBC Error: SQL Statement Execution error

3. DAO/Indexes/Empty Key fields

4. SET LOCAL again

5. Creating indexes on SQL Server with DAO 3.5 does not work

6. User-friendly database system with forms-update to multiple tables??

7. Accessing Indexes with DAO


9. DAO and Adding Index to a Table

10. DAO - Fill in foreign key with correct PK index from a string-data table

11. Creating DBASE-Indices with DAO and VB 5

12. Clarification on FoxPro, DAO and Indexes

13. DAO to open index