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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-Time Error 3027

Status
Not open for further replies.

loydlr

Technical User
Mar 4, 2002
34
RU
Getting error 3027 and can't figure out why.

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String

Set db = CurrentDb

strSQL = "SELECT tblBOM.PolyUOMcost, tblPartsTEMP.CurrentCost " & _
"FROM tblBOM " & _
"INNER JOIN tblPartsTEMP ON tblBOM.PolyID = tblPartsTEMP.Numbered " & _
"Where Not IsNull(tblBOM.PolyID)"

Set rs = db.OpenRecordset(strSQL)


With rs
Do Until .EOF = True
rs.Edit
rs("PolyUOMcost") = rs("CurrentCost")
rs.Update

.MoveNext
Loop
End With

rs.Close
Set rs = Nothing
Set db = Nothing



tblBOM is a local table
tblPartsTEMP is a linked table

Any help would be greatly appreciated
 
How are ya loydlr . . .
Error 3027 said:
[blue]Cannot update. Database or object is read-only.[/blue]
By chance did you copy your backend from a CD?

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
It's a relatively small database created to generate Bill of Materials. The database has not been split. All the data is in a single .accdb file except for a single table [tblPartsTemp] on a SQL server.
 
My recent reply implied you should attempt to make Numbered a primary key and then try the code. However, as I stated earlier, I think an update query would be more effective.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top