P
Pamela
I have a command button on my Main Form that is supposed to, on the OnClick
Event, set focus to a control on a subform and copy its contents and then
close the entire form but I am getting an error that "The command or action
"Copy" isn't available now." Any ideas about how to work around this?? The
OnGotFocus event of the text box to be copied runs it's own code that
concatenates text from all over the form. This box does have a tab stop but
I have it coded so that focus doesn't go to it directly for the user - only
for the purpose of copying here. Here is my code attached to the command
button trying to run the copy procedure:
On Error GoTo Err_cmdExit_Clic
Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!Text6.SetFocus
DoCmd.RunCommand acCmdCopy
DoCmd.Close
Exit_cmdExit_Click:
Exit Sub
Err_cmdExit_Click:
MsgBox Err.Description
Resume Exit_cmdExit_Click
End Sub
Thanks so much for any help!
Pamela
Event, set focus to a control on a subform and copy its contents and then
close the entire form but I am getting an error that "The command or action
"Copy" isn't available now." Any ideas about how to work around this?? The
OnGotFocus event of the text box to be copied runs it's own code that
concatenates text from all over the form. This box does have a tab stop but
I have it coded so that focus doesn't go to it directly for the user - only
for the purpose of copying here. Here is my code attached to the command
button trying to run the copy procedure:
On Error GoTo Err_cmdExit_Clic
Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!Text6.SetFocus
DoCmd.RunCommand acCmdCopy
DoCmd.Close
Exit_cmdExit_Click:
Exit Sub
Err_cmdExit_Click:
MsgBox Err.Description
Resume Exit_cmdExit_Click
End Sub
Thanks so much for any help!
Pamela