Hi all, 
I've been using the following code to copy a [MemberID] and paste it in another form on a [MemberID] field when pressing a button.
I'm suddenly getting the error in the title and I have no idea why. It had been working with no problems so far.
	
	
	
		
Any idea what's causing the error?
 I've been using the following code to copy a [MemberID] and paste it in another form on a [MemberID] field when pressing a button.
I'm suddenly getting the error in the title and I have no idea why. It had been working with no problems so far.
		Code:
	
	
	Private Sub btnNewCase_Click()
If Nz(Me.MemberID, "") <> "" Then
    With Me.MemberID
        .SetFocus
        .SelStart = 0
        .SelLength = Len(.Text)
    End With
    DoCmd.RunCommand acCmdCopy
Else
    MsgBox "There is no text for copying"
End If
    DoCmd.OpenForm "frmCases"
    DoCmd.GoToRecord , , acNewRec
    'Paste clipboard
    Me.MemberID.SetFocus
    DoCmd.RunCommand acCmdPaste
End Sub 
	 
 
		 
 
		