G'day,
I am running access 2007 in Win7. I have a time sheet application that I wrote many years ago. Within same I have a button to press to open a new form to enter time sheet data. The data for the form comes from a query that links Employee and the Timesheet history data file.
In an effort to upgrade and make the application more portable and available to multiple users, I decided to migrate the data tables to a Microsoft SQL 2012 database.
Various Access reports based on the SQL database run ok. But if I try to open a form to add a new record I get the following error message:-
"Run-Time Error '2105' You can't go to the specified record."
If I debug the error it shows:-
Private Sub
Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
In an effort to make sure the original time sheet form load worked ok on the original tables, I changed the query to feed off tables in the local Access program and have no issues. It works perfectly. Also if I open the Timesheet Query that feeds the form I can add new records.
However if I change the Query to look at the same tables on the SQL database I cannot add records. I can search all records from first to last but not add a record into the query. The add record arrow is greyed out on the query results.
I assume that the problem must be with the access to SQL but I am not sure where to go looking next.
Any suggestions would be greatly appreciated.
I am running access 2007 in Win7. I have a time sheet application that I wrote many years ago. Within same I have a button to press to open a new form to enter time sheet data. The data for the form comes from a query that links Employee and the Timesheet history data file.
In an effort to upgrade and make the application more portable and available to multiple users, I decided to migrate the data tables to a Microsoft SQL 2012 database.
Various Access reports based on the SQL database run ok. But if I try to open a form to add a new record I get the following error message:-
"Run-Time Error '2105' You can't go to the specified record."
If I debug the error it shows:-
Private Sub
Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
In an effort to make sure the original time sheet form load worked ok on the original tables, I changed the query to feed off tables in the local Access program and have no issues. It works perfectly. Also if I open the Timesheet Query that feeds the form I can add new records.
However if I change the Query to look at the same tables on the SQL database I cannot add records. I can search all records from first to last but not add a record into the query. The add record arrow is greyed out on the query results.
I assume that the problem must be with the access to SQL but I am not sure where to go looking next.
Any suggestions would be greatly appreciated.