Insert UserID after copy

D

dl

Hello,
I've used some code suggested by Jeff Conrad
(http://www.mvps.org/access/api/api0008.htm) to pull the current user's
network ID, and it works beautifully on new records. However, I've run into
an issue; when someone copies a record (due to another issue I had to use a
SQL statement to make the copy funtion work)

(here's my code for the copy)
DoCmd.RunSQL "INSERT INTO tbl_MainBarcode_Single_new SELECT BarcodeID,
OfferDetail, ... CreatedBy FROM tbl_MainBarcode_Single_new WHERE ([BarcodeID]
= Forms!frm_Entry_SingleItem.BarcodeID)"

....so, as you can tell, it copies the CreatedBy (userName) field as well,
I'd like it to pull the current users network ID for the copied record (as if
it were new). Any guidance as to how I might accomplish this?

Thanks so much!! (please let me know if I need to include more details,
also I'm very limited in my knowledge of VB, so please dumn down any replies,
thanks! : )
 
D

Douglas J Steele

Already answered in another newsgroup to which you posted the same question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top