I have encountered a very strange phenomena, which shocked my confidence in Access, and reminds me very mutch to excel!
I have a table with an indexed (No duplicates) text field as primary key. The values are actually numbers, but I have chosen the text format to keep leading zeros. Today I have discovered, that there are some items in there that Access can't find (with any of its find methods), and also some duplicates made their way in, probably, because of the same reason.
The table is handled trough VBA code like:
Investigating the issue, I have copied the table, and pasted it into excel. Surprisingly, some entries were texts, but other are numbers! Sorting and filtering did not work in excel either, unless I have converted them all to the same format.
In Acces table, and in forms also these "wrong" records looks like all the others, except they can not be found.
What have happened?
Thanks,
Edit:
When I select the column, and paste it into notepad, I get a pattern like this:
4944370
4950137
"4950139"
4950141
"4950563"
4950597
4955602
I have a table with an indexed (No duplicates) text field as primary key. The values are actually numbers, but I have chosen the text format to keep leading zeros. Today I have discovered, that there are some items in there that Access can't find (with any of its find methods), and also some duplicates made their way in, probably, because of the same reason.
The table is handled trough VBA code like:
Code:
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("MyTable", dbOpenDynaset, dbDenyRead)
rst.Edit 'or rst.AddNew
rst![Field]=something
rst.Update
Investigating the issue, I have copied the table, and pasted it into excel. Surprisingly, some entries were texts, but other are numbers! Sorting and filtering did not work in excel either, unless I have converted them all to the same format.
In Acces table, and in forms also these "wrong" records looks like all the others, except they can not be found.
What have happened?
Thanks,
Edit:
When I select the column, and paste it into notepad, I get a pattern like this:
4944370
4950137
"4950139"
4950141
"4950563"
4950597
4955602
Last edited: