473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

From a txtbox on a form, how can I alter an initialized variable value?

Hi again, Guys,

As usual I started going about this the wrong way because I lacked knowledge. I'm learning all the time tho...now I have a public variable in a module that is initialized with a value. I use a simple function then to call that value to a textbox on a form.

My problem is how can i (my user)alter that initialized value? The contents of the textbox are not editable directly which is probably obvious to all who know how functions really, um, function.

Am I making sense? As an example, one of my variables is the VAT (sales tax) rate....

Thanks,

StonwardR
Feb 19 '11 #1

✓ answered by NeoPa

Hi Ston. I think I understand what you're after now.

As a public variable is accessible from anywhere in the project (assuming it's defined in a standard modeule rather than any specific class module - which includes those for forms and reports). Thus it can be set as easily is read from any code in the project. That includes code running in a form's associated module. Does that clarify matters?

5 1560
NeoPa
32,556 Expert Mod 16PB
Royston, What are you asking?

I'm sure we can help if only we knew what the question was. If you can't find the words to explain it well, then perhaps giving an example or some code might help us to realise what you mean.
Feb 19 '11 #2
Hi, sorry NeoPa (good to speak with you again) - looks like the details to my qquestion didn't get sent!

I have a global variable declared in a module so that figure can be 'seen' on all forms. To get that figure to show in a textbox I used a simple function to call the variable having give it a value (initialized it) in the module. The trouble is that now and again the value of the variable needs to be altered by the user. How do I alter the value of a public (or global) variable from a form? Hope I'm being clear....
Thanks for your time,

stonwardR
Feb 21 '11 #3
NeoPa
32,556 Expert Mod 16PB
Hi Ston. I think I understand what you're after now.

As a public variable is accessible from anywhere in the project (assuming it's defined in a standard modeule rather than any specific class module - which includes those for forms and reports). Thus it can be set as easily is read from any code in the project. That includes code running in a form's associated module. Does that clarify matters?
Feb 21 '11 #4
Thanks again, NeoPa,

Almost there I think - and still learning!

stonwardR
Feb 22 '11 #5
NeoPa
32,556 Expert Mod 16PB
A pleasure to help :-)
Feb 22 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: bawar | last post by:
Hellow, I don't seem to be able to send trough the variable 'language' from my form to the php-variable $language that I want to use in my session... I first tried in the form with a drop down...
11
by: Pete Mahoney | last post by:
I am currently working on an ASP page where I create a lot of different check boxes. I have some checkboxes that are Windows platforms and some that are solaris platforms. I want a control...
3
by: Bills | last post by:
I know this is simple but I am stumped. Trying to get the value of a TextBox from another form. Form name is frmStart and Tbox name is tbxInis. In vb6 I could just use frmStart.tbxInis.text but...
1
by: Larry L | last post by:
I'm pretty novice at javascript, and it took me this long to understand what is happening in my page so far. On my page I do several things, requiring user input, to create a variable that I...
5
by: GB | last post by:
Hello: In my MS Access project I have two objects - my form and my report. I need to pass variable value from Command_click procedure of my form to Report_open procedure of my report. How can I...
3
by: lauch2 | last post by:
Can anyone talk me is there existed a "default" value for a un-initialized int variable in a release build in VC6 and VC7.1. (I know there is a compilation warning) For Example: main(){ int a;...
2
by: widevision7 | last post by:
I am creating a web site where I want to have the same menu on each page. I created a "menu file", and put the html print statements in the file. The menu file contains html code: <table>...
6
by: gggram2000 | last post by:
I'd like to know how I go about passing two variables from one form to the next. For example, I can pass a variable like this: This demonstrates how to pass a variable to a form when the form is...
2
by: xtiansimon | last post by:
I'm using a form element to alter (or not alter) a variable used to adjust the page layout. This is a basic PHP, MYSQL and CSS page. The form element is supposed to send the name of the form and the...
4
by: Jamen98 | last post by:
I'm trying to pass the "ADA_Member_Factor" variable from on form to another. The first form that puts a value in the variable is below: Option Compare Database Dim ADA_Member_Factor As...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.