Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help 3027 error cant update, database or object is read-only

Status
Not open for further replies.

nicklewis

IS-IT--Management
Feb 7, 2005
21
GB
this was working but now has decided to not work today.
any ideas?
this is the code and it has stopped where the * is

If txtday = "Monday " Then
txtanswer = txtminus3day
Else
txtanswer = txtminusoneday
End If

tblDate.MoveFirst
Do While Not tblDate.EOF
If tblDate![Date] = txtanswer Then
Exit Sub
Exit Do
End If
tblDate.MoveNext
Loop



*tblDate.AddNew
tblDate![Date] = txtanswer
tblDate.Update
 
Any error message ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
oh yeah sorry

it says "can't update, database or object is read only"

the only thing that we have been doing latley is upsizing the db to sql but havent had a chance to touch the table called date yet anyway
 
How is the tblDate opened ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
tbl date is the recordset in which opens the table Date

what this process is doing is finding todays date minusing one day from it then adding it automatically if not already entered to the date table
 
My question was: please post the code showing us how you open the tblDate recordset.
Another question: in the table window can you modify/add/delte records from the date table ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
no i cannot add to the table strange how do i get around this

sorry the start of the cod is

Dim db As Database
Dim tblDate As Recordset

Set db = DBEngine.Workspaces(0).Databases(0)
Set tblDate = db.OpenRecordset("Date", dbOpenDynaset)
 
Does have the date table a PrimaryKey recognized by Access ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
yes it has two fileds very simple table

DateId autonumber primary key
Date
 
So, seems you have to check the permissions for this table.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top