Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
keeping form open
On my form, there is a "submit" button. When the user
enters the data, they push the "submit" button. This kicks off a routine to write the data they entered. It also has an edit to make sure the amount (one text box) on the form is not greater than the current balance (of another field.) If the amount is less than or equal to the current balance than there is no problem. However, if the amount is greater than the current balance, I do not want to write the data and I want to leave the form open so the user can make a correct and hit the "submit" button again. Not sure how to do this. Should I make the amount vs. current balance a separate routine within the routine kicked off by the "submit" button? Any help or examples would be greatly appreciated.....Thanks for the help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
keeping form open
In the error condition, just don't unload or hide the form.
-- HTH RP (remove nothere from the email address if mailing direct) "JT" wrote in message ... On my form, there is a "submit" button. When the user enters the data, they push the "submit" button. This kicks off a routine to write the data they entered. It also has an edit to make sure the amount (one text box) on the form is not greater than the current balance (of another field.) If the amount is less than or equal to the current balance than there is no problem. However, if the amount is greater than the current balance, I do not want to write the data and I want to leave the form open so the user can make a correct and hit the "submit" button again. Not sure how to do this. Should I make the amount vs. current balance a separate routine within the routine kicked off by the "submit" button? Any help or examples would be greatly appreciated.....Thanks for the help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
keeping form open
Depending on how many things I need to check I will very often have a boolena
variable blnHideForm which I set to tru right at the beginning. I then Validate the itmes on the form. If any of the validations fail then I set the boolean to false. The lst thing I di is something like if blnHideForm = True then frmMyForm.hide This is just a more robust version of what Bob suggested. If you are only checking on thing then go with Bob's version... HTH "JT" wrote: On my form, there is a "submit" button. When the user enters the data, they push the "submit" button. This kicks off a routine to write the data they entered. It also has an edit to make sure the amount (one text box) on the form is not greater than the current balance (of another field.) If the amount is less than or equal to the current balance than there is no problem. However, if the amount is greater than the current balance, I do not want to write the data and I want to leave the form open so the user can make a correct and hit the "submit" button again. Not sure how to do this. Should I make the amount vs. current balance a separate routine within the routine kicked off by the "submit" button? Any help or examples would be greatly appreciated.....Thanks for the help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save copy on Open, keeping old backup copies | Excel Discussion (Misc queries) | |||
Keeping program open even when closing workbook | Excel Discussion (Misc queries) | |||
Using a template form, advance a form number everytime you open | Excel Discussion (Misc queries) | |||
Keeping 2 Excel workbooks open at the same time | Excel Discussion (Misc queries) | |||
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? | Excel Programming |