A more elegant solution?

I often want to display the value of a global variable in a form or report. 
I need to do this via a function (can't just display the variable itself, it 
seems).  Instead of a bunch of specific functions, I'd like to have a single 
"fncDisplayGlobal()" function.  I could create one with an ever-growing 
SELECT statement in it, but is there a more elegant way?  Can I somehow pass 
in the name of the function as a string and then magically turn it into the 
variable of the same name?  And then pass back the value? 


0
Laurel
7/7/2007 7:02:14 PM
access.formscoding 7493 articles. 0 followers. Follow

4 Replies
352 Views

Similar Articles

[PageSpeed] 33

"Laurel" <FakeMail@Hotmail.com> wrote in
news:#Rgn0jMwHHA.1204@TK2MSFTNGP03.phx.gbl: 

> I often want to display the value of a global variable in a
> form or report. I need to do this via a function (can't just
> display the variable itself, it seems).  Instead of a bunch of
> specific functions, I'd like to have a single 
> "fncDisplayGlobal()" function.  I could create one with an
> ever-growing SELECT statement in it, but is there a more
> elegant way?  Can I somehow pass in the name of the function
> as a string and then magically turn it into the variable of
> the same name?  And then pass back the value? 
> 
why go to all that trouble. Just put a label on the form or report 
and put the following code into the logical event 
me.label.caption = variable.


-- 
Bob Quintal

PA is y I've altered my email address.

-- 
Posted via a free Usenet account from http://www.teranews.com

0
Bob
7/7/2007 6:32:09 PM
This is easy. Put a lable or text box on the form, put (name).caption or 
(name).text where name is something like lblFormVariable or txtFormVariable 
etc (depending on which you use), then make the label or text box hidden by 
default so set visible to false.

This should solve the problem : )

"Bob Quintal" <rquintal@sPAmpatico.ca> wrote in message 
news:Xns99669CAFCE9E3BQuintal@66.150.105.47...
> "Laurel" <FakeMail@Hotmail.com> wrote in
> news:#Rgn0jMwHHA.1204@TK2MSFTNGP03.phx.gbl:
>
>> I often want to display the value of a global variable in a
>> form or report. I need to do this via a function (can't just
>> display the variable itself, it seems).  Instead of a bunch of
>> specific functions, I'd like to have a single
>> "fncDisplayGlobal()" function.  I could create one with an
>> ever-growing SELECT statement in it, but is there a more
>> elegant way?  Can I somehow pass in the name of the function
>> as a string and then magically turn it into the variable of
>> the same name?  And then pass back the value?
>>
> why go to all that trouble. Just put a label on the form or report
> and put the following code into the logical event
> me.label.caption = variable.
>
>
> -- 
> Bob Quintal
>
> PA is y I've altered my email address.
>
> -- 
> Posted via a free Usenet account from http://www.teranews.com
> 

0
Tom
7/7/2007 8:49:31 PM
Thanks.  This is the more elegant solution I was looking for....  But I 
guess if I'd thought along different paths I could have figured it out 
myself.   Duh.

"Bob Quintal" <rquintal@sPAmpatico.ca> wrote in message 
news:Xns99669CAFCE9E3BQuintal@66.150.105.47...
> "Laurel" <FakeMail@Hotmail.com> wrote in
> news:#Rgn0jMwHHA.1204@TK2MSFTNGP03.phx.gbl:
>
>> I often want to display the value of a global variable in a
>> form or report. I need to do this via a function (can't just
>> display the variable itself, it seems).  Instead of a bunch of
>> specific functions, I'd like to have a single
>> "fncDisplayGlobal()" function.  I could create one with an
>> ever-growing SELECT statement in it, but is there a more
>> elegant way?  Can I somehow pass in the name of the function
>> as a string and then magically turn it into the variable of
>> the same name?  And then pass back the value?
>>
> why go to all that trouble. Just put a label on the form or report
> and put the following code into the logical event
> me.label.caption = variable.
>
>
> -- 
> Bob Quintal
>
> PA is y I've altered my email address.
>
> -- 
> Posted via a free Usenet account from http://www.teranews.com
> 


0
Laurel
7/7/2007 9:30:48 PM
"Laurel" <FakeMail@Hotmail.com> wrote in
news:OeoY12NwHHA.4132@TK2MSFTNGP02.phx.gbl: 

> Thanks.  This is the more elegant solution I was looking
> for....  But I guess if I'd thought along different paths I
> could have figured it out myself.   Duh.

Laurel, 

The problem with thinking along a different path is first 
getting out of the rut in the path you are currently on.

I don't know who said that but I've often needed a push from 
somebody else to get out of the rut I'm in.

Luck,

Q. 


> 
> "Bob Quintal" <rquintal@sPAmpatico.ca> wrote in message 
> news:Xns99669CAFCE9E3BQuintal@66.150.105.47...
>> "Laurel" <FakeMail@Hotmail.com> wrote in
>> news:#Rgn0jMwHHA.1204@TK2MSFTNGP03.phx.gbl:
>>
>>> I often want to display the value of a global variable in a
>>> form or report. I need to do this via a function (can't just
>>> display the variable itself, it seems).  Instead of a bunch
>>> of specific functions, I'd like to have a single
>>> "fncDisplayGlobal()" function.  I could create one with an
>>> ever-growing SELECT statement in it, but is there a more
>>> elegant way?  Can I somehow pass in the name of the function
>>> as a string and then magically turn it into the variable of
>>> the same name?  And then pass back the value?
>>>
>> why go to all that trouble. Just put a label on the form or
>> report and put the following code into the logical event
>> me.label.caption = variable.
>>
>>
>> -- 
>> Bob Quintal
>>
>> PA is y I've altered my email address.
>>
>> -- 
>> Posted via a free Usenet account from http://www.teranews.com
>> 
> 
> 
> 



-- 
Bob Quintal

PA is y I've altered my email address.

-- 
Posted via a free Usenet account from http://www.teranews.com

0
Bob
7/7/2007 10:04:50 PM
Reply:

Similar Artilces:

is great plain is a good solution ?
hi every one , we have an offer to have a new solution great plains I want to know if it's a power solution to a medium company. waiting for your replay. thanks for every one. Hello You did'nt mentioned about your industry type or business activity. From microsoft web site itself you will get good information. http://www.microsoft.com/BusinessSolutions/default.mspx http://www.microsoft.com/BusinessSolutions/GreatPlains/default.mspx Thanks BS "mohamed fathy" <download2m@yahoo.com> wrote in message news:6915EF4A-DBCD-415B-A0B2-6ACDCE0CAE64@microsoft.com... &g...

Solver
I am working on a table that has ratings from G5:G55, and percent payouts based on those raitngs in cells H5:H55. I want to be able to run something (solver maybe), that will fill in the cells in column H until cell G58 (which tells me I'm out of money) hits zero. The solutions in column H should be linear in that they should increas at the same rate. To complicate matters, I want to be able to tell the "solver" where to start and finish (i.e. cell H33 should be 1.0 or higher and cell H55 should be 3.0 or lower) and then have it distribute the the variable in between. The numbe...

Need a sorting solution
I have a worksheet with 5 columns and 5 rows. A number gets entered into each cell (A1:E5). I need to sort so that each number is placed in sequential order (smallest to largest) across the columns and down the rows (see example below). Can this be done? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Posted in other groups. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Patrick Simonds" <ordnance1@comcast.net> wrote in message news...

An Exciting scenario-Solution required
Hello All, I hope you ppl would help me for finding a solution to an exciting development. Our client has an existing system running on Oracle 10g. They want to use RMS as well but can't drop using Oracle. Therefore, it's decided that we will work out some way in order to use both. So the scenario is: any additions/deletions/modifications in Items will be made directly in Oracle and its reflection should show up in RMS Item's master data as well. Any ideas to figure out an appropriate solution. (What we figured out is to do do Oracle - MS SQL Server replication). The nex...

IE has stopped working: windows check for solution
Unable to use search bars for Bing and yahoo. Everytime I try to search I get the subject message. Additionally Im also getting another window saying this tab has been recovered, a problem with this webpage caused IE to close and reopen this tab. Everthing else seems to be working fine. I am working on a new laptop which came with OS 7. These messages are annoying how can I solve these problems -- Eric2009 Have you run the IE8 Troubleshooters? http://support.microsoft.com/kb/967896 (Method 3) Have you tried doing a Reset? http://windows.microsoft.com/en-US/windows7/Reset-In...

non start up solution
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC I found after months of non starter with all accept word, that the problem was the lack of memory. When I moved 25Gigs of itunes to an external drive, my memory increased back to 42Gigs. Only then did my Office return to normal usage and everything opened!! So check there is enough memory space, it doesn't say that anywhere. I was down to 17 Gigs. Clearly not enough. Hi Vanessa; Thanks for sharing your solution :-) The concept is absolutely correct, but the terminology is a bit off: You're actually referring ...

Multiple Currency Solution CRM 1.2 / 3.0
Does somenone have the solutions for using multiple currency in MS CRM 1.2 / 3.0 ? Martine wrote: > Does somenone have the solutions for using multiple currency in MS CRM 1.2 / > 3.0 ? K3 have developed a multi currency option for Microsoft CRM. The add on component allows the user to define a base currency and then create an unlimited number of foreign currencies with default exchange rates. Default currency codes are then added to Contacts, Accounts, Opportunities and Quotation objects. The add-on also supports multi-currency price and discount lists, checking that the correct c...

Exchange realtime backup solution
Is there any cost effective backup solution which can duplicate the emails on real time basis? So it can be restored lost emails anytime. with typical backup one can restore previous day backup. Thanks arun Aloha arun, If by "lost" you mean "deleted" then you should be looking at deleted item retention. http://www.google.com/custom?domains=FactPlace.com%3Ben.wikipedia.org&q=Exchange%20Deleted%20Item%20Retention&sitesearch=&client=pub-0112969794113307&forid=1&ie=ISO-8859-1&oe=ISO-8859-1&safe=active&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%2...

Microsoft Business Solutions CRM Mobile Version 1.2 just posted!
http://www.microsoft.com/downloads/details.aspx?FamilyID=94d65396-39c4-40be-8afd-34c939ca607b&DisplayLang=en http://www.microsoft.com/downloads/details.aspx?FamilyID=bd4af7be-2e9b-4419-922f-6e4eb3fd30d5&DisplayLang=en -- John O'Donnell Microsoft CRM MVP Anyone who knows when the Danish version is ready ? "John O'Donnell" <csharpconsulting@nospam-hotmail.com-nospam> skrev i en meddelelse news:evdi$aMeEHA.2784@TK2MSFTNGP10.phx.gbl... > http://www.microsoft.com/downloads/details.aspx?FamilyID=94d65396-39c4-40be-8afd-34c939ca607b&DisplayLang=en > &...

ACCESS write conflict solution ???
Hi! I am using an ACCESS 2003 .ADP as a frontend for a MS SQL Server 2005 Express Edition database. I have a form, which has 4 subforms which all have the same table as data-source, the subforms are part of a tab-control. I encountered the problem, that after modifying a field in one subform and changing to another, an ACCESS-message-box appears which tells me that another user has modified the data and I can just save/ignore/save to clipboard. I use a timestamp column within my table and also dont have an BIT fields with possible NULL values. how can I get rid of these ACCESS-message-box...

Follow this solution and I have the question asks you
Hi Gre You can assigns the activity to another one by workplase --> Activities --> (Dubble click the selected item) --> Action --> Assign.. I have the problem with the Appointment function. I can not use it. When I create and select the strat datetime and end datetime and save, if they are not equal then error as in even log below "MSCRM Platform Error Report ------------------------------------------------------------------------------------------------------- Error: <description>Invalid XML.</description><details>The datetime is not valid in attribute &...

Looking for POS (Not RMS) Matrix Solution Or Suggestion
Hi all, We've been using POS in our store for about a year now and it has worked perfectly. However, we're now expanding our product inventory to include some apparel and now it's looking like we need matrix functionality. Other than that though, there is not really a need to upgrade to RMS. It's just the one store with one register, etc. And everything else we need is provided my POS beautifully. So does anyone know of a third party add-on for matrices for POS? Or does anyone have a clever workaround for how to keep track of the various sizes and styles without a mat...

SOLUTION
I originally posted to this newsgroup on 2/9/04; but the post disappeared. Below is my "work around". PROBLEM: I'm running Win XP home edition and OL2k IMO via a DSL connection. I have four accounts. Each account accesses the same ISP using the same POP and SMTP server. Accept for the Account Name, each account is setup identically - including the same password (Remember Password is checked). When I click Send/Receive, two of the accounts bring up a dialog box requiring the User Name & Password. The other two do not. QUESTION: Why do you think two of the accounts require...

Solution to: Metrics will not display in GP while using Office 2007
In case you are having trouble viewing metrics in GP using Office 2007, download and install the 2003 Office Web Components package from Microsoft Downloads. http://www.microsoft.com/downloads/details.aspx?FamilyId=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=en Apparently this is not included with 2007 install (or at least I haven't found it) Hope this helps someone! Mike ...

SHARED SOLUTION: Horizontal lines on XY Scatter w/multiple series
Thought I'd share this with the group. It's really just a variation of a technique worked out by Jon Peltier. Note: developed using A97, untested in later versions. - Create xy scatter chart. - Enter your target threshold values in an adjacent range of cells like so: [blank] Target 0 9.1 1 9.1 - Select the chart, Chart>Source Data, Series tab. Click Add button to create a new series (name doesn't really matter). Set x values to the range in the <blank> column & the y values to the values in the Target column. Click OK. Look carefully ...

Is CRM still "the" solution to success?
We've been talking about CRM for ages, but it seems that we don't really understand what CRM is. It's not an application, but still everyone sees it as is. CRM is about managing customer relationship, and this shouldn't and couldn't be achieved through application but personal interactions. Although it's true that a good relationship is more likely to have a higher chance of success, CRM-based application cannot guarantee any enterprise a successful relationship with the customers. It just helps enterprise get things done more efficiently but not necessarily e...

Exporting payroll data from Creative Solutions to import into Grea
We prepare and process payroll checks for a client. Rather than having to print reports and have the client enter data manually. Is anyone exporting from Creative Solutions Payroll Solutions to a file that can then be imported into Great Plains to record the payroll transactions? Thanks in advance, Janet ...

Access frontend with SQL Server backend: my solution for ODBC Call error
Hi This thread follows threads I started in forums microsoft.public.access.forms, and microsoft.sqlserver.programming: 1. 'Overriding constraint violation message' at 21.04.2010 12:00; 2. 'Overriding constraint restriction message, when deleting record(s) from form' at 29.04.2010 10:36. The problem (Occurs in Access 2000 mdb as stated by MS and in Access 2007 mdb as I myself discovered): When record operation is aborted from SQL Server, Access gets the full information about error, but this info gets unaccessible at moment when OnError event is triggered. The...

Microsoft Business Solutions CRM 2005 (version 2.0) News and Updates
We posted a web page that tries to summarize the publically available information (no rumours!) regarding: 1. When will Microsoft CRM 2005 (v2.0) ship? 2. What new features will be included in Microsoft CRM 2005 (v2.0)? http://www.sonomapartners.com/articles/microsoft-crm-2005.aspx If you have any articles or links to suggest, please send us an email! Thanks in advance, Mike Snyder Sonoma Partners Worldwide Microsoft CRM Solution Developer of the Year Hi Mike, I just saw an email indicating 4th quarter 2005. If you email me at tony.gin@na.centrica.com I can forward you the email no...

OOO and NDR Security Risk Solutions
Hi, I'd like to enable NDRs and external OOO messages, which have been disabled by the previous IT Manager, but I am aware of the potential security risks. Can someone please recommend security tools which help prevent some of these risks? Thanks, Matt I know that guns kill people. Can someone recommend a gun that doesn't kill people as much? -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" <mlaufer@srg.com> wrote in message news:1160520993.355412.165180@b28g2000cwb.googlegroups.com... > Hi, > > I'd like to enable N...

Outlook Calendar doesn't show up -- magic solution post exists somewhere
There is a post somewhere, that I have searched for and searched for, that has a simple solution for making the Outlook calendar magically reappear. All it involves is hitting two keys something like <Control> and 6. Unfortunately, I can't remember the two keys nor can I find the post again. But the solution works so well . . . and I can't remember what it was. Ususally I write down wonderful tips but must have forgotten this time! Does anyone know what the magic solution is or where I can find that wonderful post> Ctrl+6 brings up the folder list so you can see all of your ...

Logistic Solution working with GP
We are GP partner and is looking for solution that work/integrate with GP: * Ware Housing * Freight Forwarding * Transport & Haulage It will be good if the solution allow 'slight' modification (by partner) via VBA, just like GP. All feedback welcomed. You may try Maximum Data Solutions. Their barcode system has optional modules from simple warehousing to full blown advanced order picking. "HFLo" wrote: > We are GP partner and is looking for solution that work/integrate with GP: > > * Ware Housing > * Freight Forwarding > * Transport & Haulag...

I FOUND THE SOLUTION
Alright, I was having the exact same problem with the tile being the default printing set to "Tiled". The way to fix this is as follows: 1. When viewing your document on Microsoft Publisher, click on the "Format" tab. 2. Click on "Format Publication" 3. On the left-hand side, click on "Change page size..." 4. Select "Letter (Portrait)" 8.5x11 inches 5. Click Ok Now when you select file>Print, it will say 1 page per sheet! :) ...

I need elegance.....
I'm stumped and asking for elegance here.... I have a table that doesn't scale in a linear fashion (it is for use with computing the langolier pool water index) when I check the water I get a test result to compare to my table, and I then take the result from the other side for further computation 32 0 37 0.1 46 0.2 53 0.3 60 0.4 66 0.5 76 0.6 84 0.7 94 0.8 105 0.9 what I want is for a test result like 35- I'd like to get a formula response that is .06 so I'd like a formula that finds which two table numbers it...

Project Accounting Solution for GP
Hi, We are currently using Great Plains Version 7.0 and looking for a complete Project Management tool which can be used across our Group companies. Can any one suggest any solution? We are based in UK and have offices around the world. Regards, Ani There are two project solutions for Great Plains - Microsoft's own project management add-on for GP and a third-party product from Jovaco. I have heard a lot of good things about Jovaco, and a mixed reviews about MBS Project. To be fair, The Jovaco version was being installed at a relatively small firm with some but not extensive customiz...