"not an index in this table" error
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Does anybody knows how to control the the below msg to something like this through VBA:
"The Item: " & ItemNo & " already exists in the table."
instead of this:
"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
What is the Err.Number for this error?
Should Itake off the index in the table or is there a way to redo the module to account for the index? It is a big table and want it to run as fast as possible when I run a query off it.
tblLoans.Index = "PrimaryKey"
Option Compare Database Public Function VerifyAcct(AcctNum As String) Dim dbDatabase As Database Dim rsAcctNumber As Recordset Set dbDatabase = CurrentDb Set rsAcctNumber = dbDatabase.OpenRecordset("CAM_Portfolio_Query", dbOpenTable) With rsAcctNumber
.Index = "Account-Number"
.Seek "=", AcctNum
If .NoMatch = True Then
End If End With
It is giving me Runtime 3800, "FieldName" is not an index in this table.
In the table CAM_Portfolio_Query, I set the [Account-Number] field to be both the key and indexed, with no duplicates allowed.
Yet I still get this error
when I try to import a .csv file. I googled and could only find reference where there is a problem with autonumbering or an existing table field: [LINK]
This does not apply as I get the error when importing into Access 2007 a new .csv table.
Error 3409 pops on the append.rel statement. I've examined the index I created on the old table. The field name I used to create the index is the same field name used to build the relationship. Both fields are primary keys. There are records in both tables.
On a related topic, if I want to recreate a table that has been dropped for some reason, what I understrand is that I can create an index on the table before populating it with data but I cannot create a relationship to another table until the recreated table has data in it. Is that correct?
Every time I try to index, (I go in design view and set the "index" to yes with duplicates OK.
CANNOT OPEN DATABASE ITEM_NUMBER. It may not be a database that you application recognizes, or the file is corrupt.
Item_number is a field not a database. It just don't get it. I've tried to index other fields. same outcome.
I have a table with a field [Response] and a field [Index Date] along with an Id number.
I've tried this IIF statement but keep getting the Invalid Syntax error - "You may have entered an operand without an operator"
Due Date: IIF([Response]="IC Review",[Index Date]+30, IIF([Response]=3MTH F/U,[Index Date]+90, IIF([Response]=6MTH F/U,[Index Date]+180, IIF([Response]=12MTH F/U,[Index Date
Error msg: "No unique index found for referenced field of the Primary table."
How do I fix it?