Referencing forms

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi all,

I have a form for entering data and a form for viewing and
both of the forms are open. I'm trying to program a
command button in the viewing form to reference a text box
in the enter data form. Is it possible to program the
command button to get the enter data form to be displayed
and the blinking cursor to be in the text box from the
viewing form??

Thanks for the help...

mike
 
not 100% sure i followed you. are you asking if you can
set a command button in the viewing form to move the focus
to the data form and then set the focus on a specific
control in the data form? if so, then...
yes it's possible. try this code:

Private Sub Command0_Click()

DoCmd.SelectObject acForm, "frmDataForm"
Forms!frmDataForm!ControlName.SetFocus

End Sub

substitute the correct form name and control name, of
course.

hth
 
Back
Top