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  

Setting up a Global Variable / Access 2000



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2007, 05:47 AM posted to microsoft.public.access.forms
Abay
external usenet poster
 
Posts: 112
Default Setting up a Global Variable / Access 2000

Hello,

I would like to set up a variable that is accessible from both forms on a
"Master Detail" form .. e.g. I would load it up with info on a field double
click on the master form and have the info available on detail form, by a
double click or whatever.

Any help on this would be greatly appreciated.

Abay




  #2  
Old April 23rd, 2007, 05:57 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Setting up a Global Variable / Access 2000

On Sun, 22 Apr 2007 21:47:50 -0700, "Abay" wrote:

Hello,

I would like to set up a variable that is accessible from both forms on a
"Master Detail" form .. e.g. I would load it up with info on a field double
click on the master form and have the info available on detail form, by a
double click or whatever.



A global variable is not required, if the form is open; you can reference any
open form's controls directly from code anywhere in the database:

[Forms]![MasterFormName]![Controlname]

What specific "info" do you want to be made available, and for what purpose?

John W. Vinson [MVP]
  #3  
Old April 25th, 2007, 03:45 AM posted to microsoft.public.access.forms
Abay
external usenet poster
 
Posts: 112
Default Setting up a Global Variable / Access 2000

Many thanks John for your reply and apologies for not answering sooner (I
was out of town for a few days)

The database records information for a Property Management Co. The index is
the suite no and property name.

The master/detail relationship is "Master" = Property information, which
contains current tenant and owner info. The "Detail form" records
transactions against the property, phone messages from tenants, owners &
others, repair work for suites etc.

The detail has a field for the "Caller name and no" ... when the caller is
the current tenant or owner as is usually the case, I want to double click
on the tenant or owner area on the master and have it appear on the "Caller"
field on the detail, i.e. not re-type or cut and paste the info.

Your suggestion works very well for that .. again many thanks

Abay




"John W. Vinson" wrote in message
...
On Sun, 22 Apr 2007 21:47:50 -0700, "Abay" wrote:

Hello,

I would like to set up a variable that is accessible from both forms on a
"Master Detail" form .. e.g. I would load it up with info on a field
double
click on the master form and have the info available on detail form, by a
double click or whatever.



A global variable is not required, if the form is open; you can reference
any
open form's controls directly from code anywhere in the database:

[Forms]![MasterFormName]![Controlname]

What specific "info" do you want to be made available, and for what
purpose?

John W. Vinson [MVP]



 




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:18 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.