How to use one form for all other forms to show additional text...

A

Adnan

How to use one form for all other forms to show additional text on their
textboxes (on Dbl CLick)

Hi everyone, I have two main forms (frmMain1 and frmMain2) and one
frnAdditionalInfo. When I double-click on some certain textboxes in either
frmMain1 or frmMain2, i would like to open this frnAdditionalInfo showing the
text in that textbox. I can do this by having another frnAdditionalInfo but
then I’m having too many forms.

I was hoping there’s something via code that opens up the frm and then
changes it’s Record Source and text box Control Source to the active form
(say currently it is frmMain2 open) so that I use only one popupForm
(frnAdditionalInfo) for all forms. Something like this…


I tryied to do something myslef but got stuck. Here's how I started like:

Sub txtComments_Dbl_Click()

DoCmd.OpenForm "frnAdditionalInfo", acDesign

...perhaps some code here that changes ths form's Record Source and and
textbox's Control Source and then open it in form view with criteria to this
Record_ID

End Sub


Thank you so much for any help/tip provided,
Adnan
 
A

Arvin Meyer [MVP]

There is a Zoom box which can be accessed by the key combination Shift + F2.
Or with code like:

Sub txtComments_Dbl_Click()
DoCmd.RunCommand acCmdZoomBox
End Sub
 
A

Adnan

Arvin,

That did the job. I thank you a million times for all you help, your time
and expertise that you share with us.

v/r
Adnan
 
F

Florinda de Fátima

Adnan said:
How to use one form for all other forms to show additional text on their
textboxes (on Dbl CLick)

Hi everyone, I have two main forms (frmMain1 and frmMain2) and one
frnAdditionalInfo. When I double-click on some certain textboxes in either
frmMain1 or frmMain2, i would like to open this frnAdditionalInfo showing
the
text in that textbox. I can do this by having another frnAdditionalInfo
but
then I’m having too many forms.

I was hoping there’s something via code that opens up the frm and then
changes it’s Record Source and text box Control Source to the active form
(say currently it is frmMain2 open) so that I use only one popupForm
(frnAdditionalInfo) for all forms. Something like this…


I tryied to do something myslef but got stuck. Here's how I started like:

Sub txtComments_Dbl_Click()

DoCmd.OpenForm "frnAdditionalInfo", acDesign

...perhaps some code here that changes ths form's Record Source and and
textbox's Control Source and then open it in form view with criteria to
this
Record_ID

End Sub


Thank you so much for any help/tip provided,
Adnan
 

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