473,513 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reset Form Variable w/ Each Record

69 New Member
Hi All,
Let me just start by saying that this isn't a big deal, I did find a way to get it working, but I was just wondering what the "correct" way of going about this is.

I am using access 2003 and have designed a form to use for customer quotes. At the beginning of the form I declare a variable to be used by the whole form, something like, public disprice as integer, and then once a discount field is filled in, it sets disprice to equal the customer discount. Once the disprice is set, I use that in other sub's within the form to calculate prices and so on. The problem I am having, is that any time I add a new record, the variable disprice and the discount field does not reset to empty or null like I want it to, to enter in a new record. When paging through the old records, each record has the right discount shown and prices figured out, but it is when I add a new record, I want that variable to be null and the discount field to go blank.

The solution I have working right now is to clear the field when I click on the add new quote button.

Thanks all for any help!
Jan 2 '08 #1
1 2441
Lumpy
69 New Member
Never Mind all,
I figured it out. My partner, who doesn't, well I should say isn't supposed to be messing with the programing end of things decided to set that field to have a default value and that is why it was coming up the way it was. Funny guy :D

Thanks anyways!
Jan 2 '08 #2

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

Similar topics

9
29987
by: Ken | last post by:
How can I reset the initial form variables that are set with session statements when clicking on a button? I tried this but the function was not called: <?PHP function reset_form($none) {...
2
2593
by: Richard Hollenbeck | last post by:
I use a temporary table to assemble unrelated data for specific forms and reports. After each use of this table, I have a delete query which empties the table out for its next use. I have one...
2
1880
by: Leslie | last post by:
On a form, I create a record and save, and am ready to enter another. I decide to Quit the form which executes an "Undo" in case there is data entered. This then tries to "delete" my just saved...
4
2212
by: Fetty | last post by:
How do I do this -- David
5
5927
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
2
2286
by: TD | last post by:
I've read several posts here that say global variables are reset whenever an unhandled error occurs. I want to use a custom form property instead of a global variable to store a boolean value. My...
7
14602
by: Kermit Piper | last post by:
Hello, How can you clear session variables when a reset button is pressed? I thought I might be able to do something like: <% If request.form("Reset") = "Reset" then Session("variable") =...
5
4488
by: karsagarwal | last post by:
I have a bounded form and after I click the button to update/save. THe fields are still there. Is there a way to clear off the fields in the bounded form. Thanks, SA Here's the code that I...
14
19473
by: ramprat | last post by:
Hi All, I currently need to store 3 variables to be used as global variables throughout my application. I need to record the username, their employee group and the task they are doing. The...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.