Public variable

I am calling a public sub from a form, and I am trying to get the sub to be 
able to access a variable from the form.  I declared the variable as public 
in the forms code, but it isn't available to the subroutine... is this normal?
0
Utf
6/4/2010 4:28:19 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

1 Replies
1061 Views

Similar Articles

[PageSpeed] 1

Wavequation wrote:

>I am calling a public sub from a form, and I am trying to get the sub to be 
>able to access a variable from the form.  I declared the variable as public 
>in the forms code, but it isn't available to the subroutine... is this normal?


Public variables in a form/report/class module are a
property of the form/report/class.  That means that you need
to refer to it using object.property.  Depending on your
public sub's arguments, you can use this kind of syntax.

sub argument with name of form
	Forms(arg).variable

sub argument with form object
	arg.variable

no argument for the form
	Forms!theform.variable

-- 
Marsh
MVP [MS Access]
0
Marshall
6/4/2010 3:54:37 PM
Reply:

Similar Artilces:

Homing Child public folder
Child Public Folder Appears Incorrectly on an Exchange Server. Our root folder is homed in Asia. My impression was when creating a child folder it creates on the server you reside on. It then replicates to the Public Folder then gets Re-homed to what every the parent folder is. This is not happening. Has anybody seen this before? ...

Why won't my 2 publication pages switch to 2-pg view as asked?
This is a brand new publication. It only has two pages to it. There is hardly any content and NO web links. But when I use the VIEW drop down menu and click that very first option saying "Two-page spread", Microsoft Publisher does absolutely NOTHING! No, not in print view ... i'm saying "nothing". Yes, I've restarted my computer... all that. Also, in the master page view many of the options are totally greyed-out. Why doesn't microsoft just fix its software instead of adding new inefficient ones? You must have three or more pages to see a two-page ...

email publications
I have a 4 page newletter that I want to email in the body of the email but only 1 page comes thru. I have pub 2003. Any ideas You can't do it the way you want to. I have a page that will tell you how to do it but it's not something I'd rally want to do. We normally suggest converting the newsletter to a .pdf and attach that to the email. -- JoAnn Paules Microsoft MVP - Publisher How to ask a question http://support.microsoft.com/kb/555375 "sunnyatrodeph" <sunnyatrodeph@discussions.microsoft.com> wrote in message news:880FF3CD-FF2F-4839-A23E-A71F964602C5...

Variables in Message Notifications?
All, I have set up some rules for Outlook that give me specific message notifications when messages come in from particular users. I would like to include the subject of the incoming message in the notification. Is such a thing possible? The only way that I can imagine it is through a variable like $subject or some such, but I figured someone here might know. Thanks much, Todd ...

Can you open a publisher 2003 publication in publisher 2000?
Can you open a publisher 2003 document in a publisher 2000 program? No -- JoAnn Paules MVP Microsoft [Publisher] "Shaz" <Shaz@discussions.microsoft.com> wrote in message news:F6732D11-AD6F-4209-891A-CB05BD87ECC3@microsoft.com... > Can you open a publisher 2003 document in a publisher 2000 program? ...

No access to Public Folder
Hello There, I have a funky problem regarding Public Folders on a Exchange 2003 Standard. Although I see the Public Folders in Outlook I do not have the rights to add anything. I have set all the rights in Exchange System Manager, but still don't have access. Then I checked with ADSI Edit and found an entry for Public Folder but without an Entry for "Class". Also in the Exchange System Manager under Folders I do not see a "Public Folders" bu cannot creat one, because it is already there (so the warning I get). Does anyone of you have an idea? Thanks and Best Regards Dan...

show new mails in public folder
hello, our public folder dosen't show new mails like in the inbox. I want to see if a new message receive, where can I adjust this. thank's for answeres. best regards Christain In news:DBD8EFB5-F0CA-4705-B9C1-854040BA514E@microsoft.com, Christian Weihs <ChristianWeihs@discussions.microsoft.com> typed: > hello, > > our public folder dosen't show new mails like in the inbox. I want to > see if a new message receive, where can I adjust this. > > thank's for answeres. > > best regards > Christain What version of Outlook are you using? If yo...

Unable to view public folders
We are currently running Microsoft Exchange 2000. I am currently attempting to create public folders and point a designated email address at them. I am creating each folder via a terminal logged on as Administrator. When I go to the Exchanger manager to view the public folder:- > Administrative Groups > 1st Adminastrive Groups > Public Folders The following message appears:- Enter Network Password Username Password The username field is already populated with the following information:- domanin\user When i attempt to enter the password the message reappears. Hope t...

Public Folder Directory Rights
In a haste I think I removed all directory rights to a branch of my public folders. Now when I try to click directory rights button in the permissions tab within the properties of that folder in Exchange administrator I get "Unable to read security rights form the directory". I also remember inheritant rights prior. Anyone know how I can correct this so that I can fix the PF structure? -- SS I meant to say "I also removed inheritant rights earlier" -- SS "Steven" wrote: > In a haste I think I removed all directory rights to a branch of my public >...

? Manually Cast A Variable<->Raw Data
Hi, I need a way of casting a variable from one type to another and back. The problem is that there is no cast for them to or from each other. Specifically, I need a way of taking a CImageList and simply dumping it to for example, a file. I want to dump the entire variable byte-for-byte. Is there a way to do something like: CImageList m_ImageList; .... BYTE* buf=(BYTE*)m_ImageList; CFile f("c:\\zz", cFile::modeCreate); f.Write(buf, sizeof(buf)); f.Close(); I also need a way of doing the opposite. Something like: BYTE* buf; //read a properly formatted CImageList fr...

Public Folder
Hello, I have created a Public Folder with a Task View as my MIS Help Desk for my internal users. Occassionally the Task Item will disappear. I DO NOT know why it disappears, can you help me with this? Also, the users only fill in the Subject line and sometimes additional information in the body of the Task. That's all. Very puzzle!? Your help would be greatly appreciated. Thanks. ...

public contacts / public diary
when i create a new appointment for a contact in a public folder, is it possible to create that appointment in a public folder diary as well as the normal diary? cheers mark You can invite a public calendar folder.=20 --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "mark" <mark@remove.com> wrote in message = news:1121421946.30525.0@iris.uk.clara.net... > when i create a new appointment for a contact in a public folder, is = it ...

Send on bhalf of public folder
I have a user that has full access to a public folder and also send on behalf permissions of the same folder. The user still gets "you do not have permissions to send on behalf of this user" error message. Is there anything I have missed? ...

Mail merge to to new publication (publisher 2002)
Is it possible in publisher 2002 to save a mail merge document to a new publication in order to edit merged text rather than merge fields as is possible in 2003, or is there another way? Thanks After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Sean <sean30358@hotmail.com>... > Is it possible in publisher 2002 to save a mail merge > document to a new publication in order to edit merged > text rather than merge fields as is possible in 2003, or > is there another way? The Publisher 2002 merge was far more limited than the 2003 merge. -- Ed Be...

best way to migrate public folders
Hi all, Now, we are moving exchange 2000 users to exchange 2003 SP2 servers. BTW, what's the best way to migrate all public folders to the new servers? Thanks in advance. On Fri, 4 Aug 2006 09:35:02 -0700, Sally <Sally@discussions.microsoft.com> wrote: >Hi all, > >Now, we are moving exchange 2000 users to exchange 2003 SP2 servers. BTW, >what's the best way to migrate all public folders to the new servers? > >Thanks in advance. > Create replicas on the new server. May want to take a gander at this as well. http://support.microsoft.com/kb/822931/ ...

Using A variable for form name
Hi, I have a set of tables and forms with the same names. I've populated a listbox with the form/table names. I'd like to be able to show a form upon clicking the name in the listbox or a button. I've been trying diff things like the following (this is from a button): Text15 = Me.List10.ItemData(List10.ListIndex) a = Text15.Text a.Visible = True which is not working. Is it possible to show a form using a variable? Or is there another way of going about this? Thanks! I'm assuming Text15 is supposed to contain the name of a form? As long as the form is open...

Outlook 2007 Public Subfilders in Favorites
I am using Outlook 2007. I have researched this issue on the internet but do not see any updates since late 2007. If I add a subfolder to a public folder, it adds to my favorites. If I then add a subfolder to that folder (level 3) it adds to my favorites BUT it does not add to my office mate's favorites. We have the same permissions as Owner, although I am also the Administrator. Also, I have confirmed that the Properties...Favorites... is set to "add new subfolders of the public folder to this folder" and "Add all subfolders". Why is this happen...

Public Folders Contacts.
Microsoft Exchange 2003 Server Standard Edition We use our public folders as a costumer base and we have about 15,000 contact. We noticed that when doing searches by using the conventianal "Find" button located in the outlook 2003 toolbar, the search would be painfully slow and the CPU usage on the server would sky rocket for about 2 minutes. After many months of waiting, we received a solution from Microsoft located below. Now the conventional way of doing serches works like a charm, conversely we now encounter an additional problem. The advanced find feature (Which we use ...

Incorrectly Mapping to Exchange Public Folders
We have a folder on our PDC that is shared as \\server\public ... it has always been mappable from Win2K and WinXP clients. Today, a user on an XP machine started having trouble mapping to this share. Instead of the directory on the PDC, he was being mapped to the *public folders* in outlook (I guess that's "M:\org\Public Folders"?) Any idea what's going on? All other machines continue to map to the original share on the PDC. I also checked the virtual exchange drive (M:) where the exchange public folders are, and they are *not* shared. Thanks! (btw, we have a Win2K se...

How to block reminders in a public calendar
When I send a calendar item from a Public calendar, it is including a reminder to the invitees even though it is unchecked in the calendar item and unchecked as a default in my preferences. I have Outlook 2003 and they have Outlook 2007. What version of Exchange? If 2007, it might be this: http://support.microsoft.com/default.aspx?scid=kb;en-us;945854 -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.n...

Deleting Variable Ranges
This is what I would like to accomplish: current cell end down lock range=20 delete the contents of the range The ranges vary each time I want to clear them. Thanking all of you in advance HTH Bob I'm not sure what Lock Range means, but... dim myRng as range with activesheet set myrng = .range(activecell,activecell.end(xldown)) myrng.clearcontents myrng.locked = true '??? end with Bob, Clark wrote: > > This is what I would like to accomplish: > > current cell > end down > lock range > delete the contents of the range > > The ranges vary each time...

Is there a way to display Public Folders in All Mail Folders view?
We are getting ready to deploy Outlook 2003 to about 10,000 users. The powers that be do not want the users to have to click on the folder icon in order to see Public Folders (PF). They want them to be in their face when the software is first deployed. A new installation shows, on the left side of the window, Favorite Folders, All Mail Folders (which is the user's mailbox and folders that are on the Exchange server), large icons for Mail, Calendar, Contacts, and Tasks, small icons for Notes, Folder View, and Shortcuts. Then there's the little double arrow to configure all of the ic...

Collect public money
www.richworld8.blogspot.com ...

"Send as" a public folder
I have send as permissions setup for a group of users and it works great against an actual mailbox, but if I try to do the same thing against a public folder it fails saying I don't have send on behalf rights. Can this even be done. I want the mail to go out as the email address of the public folder not he people that monitor the folder. Any help would be appreciated. Thanks, Jeff Hi Im not much help here but I have the same problem but i am receiving a NDR stating: You do not have permission to send to this recipient. Any help with this also would be much appreciated Thanks ...

Public Folder Favorites-Edit Public Calendars
I have a user who manages multiple public calendars for scheduling and she has made Favorites for all of them to have easy access in her folder list. My question is if she edits the public calendars through the favorites view will that mess up the calendars as far as their being updated properly? Thanks! No, favorites are only a pointer to the real folder. However, if she is using cached exchange and is caching public folder favorites, there may be a slight delay for the server to update. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outloo...