Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I fix this Access 2003 bug? Data Entry Auto-Generating a Value
    text
    copied!<p>I'm experiencing an odd data entry bug in MS Access and I am hoping that someone can possibly help shed a bit of light on why this might be happening and how to fix it.</p> <p>I have a data table that is defined in our SQL Server database. The definition is below, with only the field names changed.</p> <pre><code>CREATE TABLE [dbo].[MyTable]( [ID] [int] IDENTITY(1,1) NOT NULL, [TextField1] [nvarchar](10) NOT NULL, [TextField2] [nvarchar](50) NOT NULL, [Integer1] [int] NOT NULL CONSTRAINT [DF_MyTable_Integer1] DEFAULT (0), [Integer2] [int] NOT NULL, [LargerTextField] [nvarchar](300) NULL ) ON [PRIMARY] </code></pre> <p>As you can see from the definition of this table that there is nothing special about it. The problem that I am having is with a linked data table in an MS Access 2003 database that links through ODBC to this table. </p> <p>After defining and creating the data table in SQL Server, I opened my working Access Database and linked to the new table. I need to manually create the records that belong in this table. However, when I started to add the data rows, I noticed that as I tabbed out of the <code>LargerTextField</code> to a new row, the <code>LargerTextField</code> was being defaulted to '<code>2</code>', even though I had not entered anything nor defined a default value on the field?!</p> <p>Initially, I need this field to be <code>Null</code>. I'll come back later and with an update routine populate the data. But why would MS Access default a value in my field, even though the schema for the table clearly does not define one? Has anyone seen this or have any clue why this may happen?</p> <p><strong>EDIT</strong></p> <p>One quick correction, as soon as I tab into the <code>LargerTextField</code>, the value defaults to '<code>2</code>', not when I tab out. Small, subtle difference, but possibly important.</p> <p>As a test, I also created a new, fresh MS Database an linked the table. I'm having the exact same problem. I assume this could be a problem with either MS SQL Server or, possibly, ODBC.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload