Paste Function

hootie318

Registered User.
Local time
Today, 04:56
Joined
Oct 28, 2003
Messages
130
I have a subform that populates the same data for every day. What I would like to do is have an OnClick even fill in all the records at once. I have tried a method of pasting, but I am sure I am either doing it worng or there is a better way.

My code:
Private Sub Command65_Click()
Me.StoreID.SetFocus
DoCmd.RunCommand acCmdPasteSpecial, "349"
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand acCmdPasteSpecial, "352"
DoCmd.RunCommand acCmdRecordsGoToNew
End Sub

I figured set focus on the first one fill in the storeid then go to next record, fill in the next storeid, etc. This does not work right.
 
Ok I figured it out. I was going at it all wrong. What I cant figure out is how to only allow this to occur once. Once you poulate the subform I dont want it to be done again.

Any Thoughts?
 

Users who are viewing this thread

Back
Top Bottom