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

Probs running DoCmd.RunCommand acCmdCopy in A97

P: n/a
MLH
Running the following procedure, Access 97 is giving me a 2465 error
in line #250. Anyone know why? MySQL is a global var in the app. This
is running in frmVehicleChooserForm.

Private Sub CopyMySQLbttn_Click()
On Error GoTo ErrorCopyMySQLbttn_Click
Dim ThisForm As String
ThisForm = Me.Name

100 Dim dtxt As Object
125 Set dtxt = Me!TextHolder
150 Me!TextHolder = CStr(MySQL)
175 DoCmd.GoToControl "TextHolder"
200 dtxt.SelStart = 0
225 dtxt.SelLength = Len(MySQL)
250 DoCmd.RunCommand acCmdCopy
275 MsgBox "MySQL has been CTRL-C copied. Now U-can CTRL-V paste
it."

ExitCopyMySQLbttn_Click:
Exit Sub

ErrorCopyMySQLbttn_Click:
Dim r As String, k As String, Message3 As String
r = "The following unexpected error occurred in Sub
CopyMySQLbttn_Click, line #" & Trim$(CStr(Erl)) & ", CBF on " &
ThisForm & "."
k = CRLF & CRLF & str$(Err) & ": " & Quote & Error$ & Quote
Message3 = r & k
MsgBox Message3, vbExclamation, "Unexpected Error - " & MyApp$ &
", rev. " & MY_VERSION$
Resume ExitCopyMySQLbttn_Click

End Sub

Jul 26 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.