How to create a record in an sqlserver table from Access adp front end

cyd44

Registered User.
Local time
Today, 22:35
Joined
Oct 30, 2011
Messages
85
Please excuse my ignorance but I dont know how to use a front end form on access adp to create a new record on the sqlserver.

I have made a connection via odbc and can see the tables on access and view them. However when I create a new record on the form and use DoCmd to save the record it appears to update the table showing in access (as dbo.tbl) but when I go back to the server the new record does no show. I did not receive any access or sqlserver errors and recieved the MsgBox message saying new record created.

Not having worked with sqlserver before, is there something I am missing. I was assuming that because my access front end could see the tables, it would be able to create, update and delete using the DoCmd available in access.

Could someone please advise.
 
Being able to 'see' the tables and the data, and being able to 'change' said data are two completely different things. That depends entirely upon how your user schema was set up on the SQL Server itself. You might have read-only access.

The fact that you didn't receive any errors doesn't say much because I don't know how your form is coded to handle errors. i.e. On Error Resume Next, would cause just about any error to be ignored.

So, you could try executing a basic INSERT or UPDATE statement by using an Append or Update query.

or try the
CurrentDB.Execute "Your SQL INSERT statement here;",dbfailonerror
method
 

Users who are viewing this thread

Back
Top Bottom