Clipboard-- how do I clear it and get rid of warning message box?

  • Thread starter Diane-Maplewood
  • Start date
D

Diane-Maplewood

Any ideas? Anyone?

I can't find the answer for this one anywhere- have searched. I have a
command button on a form that copies all the data I want to keep into a new
record, and still saves the old record. There is some background code that
replaces some field data with "null" or "0" for the new record. While it is
copying a number of fields, the fields do not have a huge amount of data in
them. Still, I get this ! Warning message each time I exit the database:

"You copied a large amount of data onto the Clipboard.
When you copy data onto the Clipboard, only the reference to the object is
copied. If you close the source document, however, Database must paste all
the data from its source. Depending on the amount of data, this can take some
time.
Do you want to save this data on the Clipboard?"

I have "unchecked" all the options in the Office Clipboard- it still shows
this message. Here is the "On Click" [Event Procedure] code from the command
button:

Private Sub keep_cutting_clear_totals_Click()
On Error GoTo Err_keep_cutting_clear_totals_Click

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Me.SLAUGHTER.SetFocus

ClearPorkTotals 'private function in this code section to
replace some data with a null or zero value

Exit_keep_cutting_clear_totals_Click:
Exit Sub

Err_keep_cutting_clear_totals_Click:
MsgBox Err.DESCRIPTION
Resume Exit_keep_cutting_clear_totals_Click

End Sub
----------

Here is what I have for the ClearPorkTotals:

Function ClearPorkTotals()
On Error Resume Next
Dim frm As Form, str1 As String, i As Integer

Set frm = Me
For i = 1 To frm.Count - 1
str1 = Me.Controls(i).Name 'code here
Select Case str1
Case "DRESS WT", "SMOKING", "PORK", "BUTCHER", "MAPLEWOOD",
"DEPOSIT", "GROUNDPORK", "PORKSAUSAGE", "ITALIANSAUSAGE", "BRATWURST",
"PORKIES", "BRKFSTPATTIES", "BRATPATTIES", "OTHER CHARGES", "FINAL WEIGHT1",
"FINAL WEIGHT2", "FINAL WEIGHT3", "FINAL WEIGHT4", "FINAL WEIGHT5"
Me.Controls(i) = 0
Case "COST1"
Me.Controls(i) = 0.43
Case "COST3"
Me.Controls(i) = 20#
Case "COST9", "COST10", "COST11"
Me.Controls(i) = 1.25
Case "COST8"
Me.Controls(i) = 1.15
Case "COST6"
Me.Controls(i) = 0.69
Case "COST7"
Me.Controls(i) = 0.89
Case "CLERK", "SLAUGHTER", "TAG", "DATE CALLED", "PICKUP DATE",
"BASKETS"
Me.Controls(i) = Null
Case Else

End Select

Next

End Function
-------------------------------
Any ideas? Anyone?


Thank you for your time and any info. I'm a non-programmer- get most of my
"code" from others! -Diane
 

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