By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,603 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,603 IT Pros & Developers. It's quick & easy.

Need help with append query

P: n/a
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,

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,
AS POSize, qryPODetailAll.Description, " & strRecNum & " AS RecNum" & _
" FROM qryPODetailAll" & _
" WHERE " & strWhere & _

'populate receiving items table
CurrentDb.Execute strSQL, dbFailOnError
End If
Thank you for any help you can give me as I am stumped.

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.