Hi,
I am having some issues with executing SQL commands within my VBA code for a form. These commands worked fine when my tables were in Microsoft Access, but sine I have upgraded them into SQL Server - the commands do not work.
Now that I am working with a Microsoft Access Project instead of a Microsoft Access Database - these issues have presented themselves.
Here is an example of my SQL code that used to work:
Dim strSQL as String
strSQL = strSQL & "INSERT INTO Salvage SELECT * FROM Hardware WHERE MachineID =""" & Me![MachineID] & """"
db.Execute strSQL
This worked fine before I upgraded my tables. Now when I try and execute this I get an error message that states the following:
You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column.
Can anyone offer any solutions to this dilema? I would really appreicate any assistance. Thanks very much.![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
I am having some issues with executing SQL commands within my VBA code for a form. These commands worked fine when my tables were in Microsoft Access, but sine I have upgraded them into SQL Server - the commands do not work.
Now that I am working with a Microsoft Access Project instead of a Microsoft Access Database - these issues have presented themselves.
Here is an example of my SQL code that used to work:
Dim strSQL as String
strSQL = strSQL & "INSERT INTO Salvage SELECT * FROM Hardware WHERE MachineID =""" & Me![MachineID] & """"
db.Execute strSQL
This worked fine before I upgraded my tables. Now when I try and execute this I get an error message that states the following:
You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column.
Can anyone offer any solutions to this dilema? I would really appreicate any assistance. Thanks very much.
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)