I am trying to run the following function. I am testing two variables (whcih I have declared as public in the general declaration section): SFsum and rcount.
I want to warn the user If SFsum <> rcount. It works fine when I have SFsum and rcount both equal to 1, 2 or 4. But When both of them are...
I had various controls on my form like tabcontrol, text boxex etc. for some reason i right clicked on my form and then clicked on Form Header/Footer and it removed header and footer from my form. Now all my controls are gone. Is there a way I could undo this or recover it. Thanks a lot for your...
You mean it loses its value at the End Function Statement? I am using a standard module and I like to preserve the value of my variable so that I could refer to it in other standard modules.
Thanks for your help
Jay
Thanks but how could I keep the value of the variable live so that I could refer to the same value when i use it in other modules.
Using the static keyword is not helping me.
I like to define a public variable in my module that can be accessed from other modules within the same project but I also like my variable to retain its value (life).
Public MyVar as string (in the general section)
This way my variable is accessible from other modules but it doen't take its...
I am trying to execute this code:
dim i as variant
dim count as integer
For i = 3 to 1
count = i+2
Next i
It works when I say for i = 1 to 3.
Any ideas or thoughts how to run a for loop with decending values like for i = 3 to 1?
Thanks a lot in advance.
Jay
I have a two dimensional array that I am using in my Access VBA code. I can reinitialize the values of my array (setting them equal to zero) by using the Redim statement.
But whenever I use Redim statement I have to give dimensions for my array.
Is there any other way I could reinitialize my...
Is there a function in Access VBA that converts a negative value to 0. I know there is a NZ function that converts null values to zero. I am just wondering if we have a function that converts negative values to zero.
Thanks a lot in advance.
Jay
I am trying to compute a varaible through the following formula:
dim avg as integer
dim test as integer
test = 1
avg = (test = 1)* 4
Debug.Print avg
it gives me -4 instead of 4. My test condition (test = 1) should return me 1 and my average should be 4 instead of
-4.
Any ideas why it's...
Is it possible to check the value of multiple variables at the same time through select case statement. In other words can i do this:
Select Var1, Var2
case 2, 3
Code comes here
End Select
If Var1 is 2 and Var2 is 3 then execute the code.
Thanks a lot in advance for your help.
Jay
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.