Hi All,
I have a split f/e - b/e setup on my database with RWOP queries on the
front end. The code below gets a PO number(s), and vendor name from a
multi choice list box on another form. It then assigns these values,
plus a new receiving number, to the current form. The SQL string is an
append query that copies select fields from the PO line items table
into the receiving line items table and appends the current receiving
number to each receiving line item. The code runs fine if I am the user
but will not run for anyone else because "record(s) cannot be added, no
insert permission on tblRecDetail". After searching these boards I have
tried giving insert permissions on the table link in the f/e (same
error), I've double checked that all queries are marked RWOP, I've made
sure the users have permissions on the queries involved. I've also read
here that the query must be an actual saved query, not a SQL string run
from VBA so I am now trying to convert it. My questions are:
1.) Am I correct in assuming this is the way I need to go?
2.) I understand how to write the new append query as far as getting
the data from the PO line items table but how do I have it append the
receiver number from the form at the same time?
Here's the partial code. I'm so sorry for the lengthy post.
Call GetFromList(Forms!frmRecPO!txtPOList, strWhere, strPONo,
strVendor)
strRecNum = NewRecNum
Me!RecNum = strRecNum
Me!DateRec = Now()
Me!CreatedBy = CurrentUser
If strPONo <> "" Then
Me!PONum = strPONo
End If
If strVendor <> "" Then
Me!Vendor = strVendor
End If
If strPONo <> "" Then
strSQL = "INSERT INTO tblRecDetail (PODetailSubID, PONum, RMCNum, UOM,
Style, Color, [Size], Description, RecNum ) IN
'C:\access\MYTABLES.MDB'" & _
" SELECT qryPODetailAll.ID, qryPODetailAll.PONum,
qryPODetailAll.RMCNum, qryPODetailAll.UOM, qryPODetailAll.Style,
qryPODetailAll.Color,
IIf(IsNull([qryPODetailAll]![size]),[qrypodetailall]![garmentsize],[qryPOdetailall]![Size])
AS POSize, qryPODetailAll.Description, " & strRecNum & " AS RecNum" & _
" FROM qryPODetailAll" & _
" WHERE " & strWhere & _
" WITH OWNERACCESS OPTION;"
'populate receiving items table
CurrentDb.Execute strSQL, dbFailOnError
End If
Thank you for any help you can give me as I am stumped.
Karen