ACC95: Yes/No Field Causes Error in AutoLookup QueryID: Q142540
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you add a record in a form (or query datasheet) bound to an AutoLookup
query, you may receive one of the following error messages:
Current field must match join key '?' on 'one' side of one-to-many relationship because it has been updated.
-or
To make changes to this field, first save the record.
The AutoLookup query contains a Yes/No data type field from the "one" side
table. For Yes/No fields, Microsoft Access automatically enters a 0 (zero)
as the default value.
Because the Yes/No field is from the "one" side table and has a hidden
default value, Microsoft Access assumes that you are trying to add a
record to the "one" side as well as to the "many" side, which generates
the error messages.
There are two possible workarounds for using a Yes/No field in an AutoLookup query. Your choice depends on whether you need to modify the Yes/No field in the "one" side table.
FieldName: MyYes/No
FieldName: Expr1: [MyYes/No]+0
Table: Sample
-----------------------
FieldName: SampleField
DataType : Number
FieldSize: Integer
ValidationRule: 0 or -1
Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.
OrderID: 11077
ProductName: Chai
UnitPrice: $18.00
For more information about AutoLookup queries, search for "AutoLookup
queries," and then "About AutoLookup queries that enter data
automatically" using the Microsoft Access 97 Help Index.
For information about the "Current field must match join key '?' on 'one'
side of one-to-many relationship because it has been updated" error
message in Microsoft Access 2.0), please see the following articles in the
Microsoft Knowledge Base:
Q116062 ACC2: Adding Records to AutoLookup Form Generates Error
Q148410 ACC95: Microsoft Jet Database Engine 3.0 Reserved Errors
List
Additional query words: #3341
Keywords : kberrmsg kbusage QryFixup
Version : 7.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 29, 1999