A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Opening a form from another one



 
 
Thread Tools Display Modes
  #1  
Old February 23rd, 2007, 04:05 PM posted to microsoft.public.access.forms
Moe
external usenet poster
 
Posts: 62
Default Opening a form from another one

I need the VBA code to open a form from another form and display the data
currently in a control of the first form in a control of the second form by
clicking a button. I know about stLinkCriteria but some times mor flexibility
is needed. I tried [Form2]![Control2]=Me![control1] after the
"DoCmd.OpenForm.." in the "OnClick" property of the button but it did not
work. Any idea?
  #2  
Old February 23rd, 2007, 04:39 PM posted to microsoft.public.access.forms
Carl Rapson
external usenet poster
 
Posts: 517
Default Opening a form from another one

You could pass the data from your control in the OpenArgs parameter of the
OpenForm call, then pick up that value in the second form's Open or Load
event and populate your control with it.

Carl Rapson

"Moe" wrote in message
...
I need the VBA code to open a form from another form and display the data
currently in a control of the first form in a control of the second form
by
clicking a button. I know about stLinkCriteria but some times mor
flexibility
is needed. I tried [Form2]![Control2]=Me![control1] after the
"DoCmd.OpenForm.." in the "OnClick" property of the button but it did not
work. Any idea?



  #3  
Old February 23rd, 2007, 04:44 PM posted to microsoft.public.access.forms
Carl Rapson
external usenet poster
 
Posts: 517
Default Opening a form from another one

You could pass the data from your control in the OpenArgs parameter of the
OpenForm call, then pick up that value in the second form's Open or Load
event and populate your control with it.

Carl Rapson

"Moe" wrote in message
...
I need the VBA code to open a form from another form and display the data
currently in a control of the first form in a control of the second form
by
clicking a button. I know about stLinkCriteria but some times mor
flexibility
is needed. I tried [Form2]![Control2]=Me![control1] after the
"DoCmd.OpenForm.." in the "OnClick" property of the button but it did not
work. Any idea?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.