Originally Posted by
jpiper
Thanks Kevin, I'm with you here, just would appreciate it if you could try to picture my project and maybe give me a some additional pointers for validating.
I'm building a grid for users to add rows for new tests, probably 4 to 8 tests(rows) combined on each sample(form with sample info). When you add a new sample(refresh form) the grid will start over blank from a new databound relationship row added. My original plan was to have each sample start with an empty grid with 9 columns. Col1 is an ID, it will have default value. Col2 is an "age" column, the user enters how many days from the "sample date" the test is to occur. Col3 is a calculated date of user entered textbox date + Col2 (you helped me with this one). Col4 user enters a diameter. Col5 is an area calculation based off diameter entered in Col4. Col6 is pounds of force that the user enters. Col7 is calculation of PSI which is Col6 divided by Col5. Col8 is default "Specified PSI". Col9 is Percent of PSI which is Col7 / Col8.
Basically you can see how nulls and zeros and letters can cause a major problem for me, especially when creating the next rows by arrowing down and when dividing by other calculated columns. I have it all coded so the math's good. What I need help with is making an error proof grid that will take whatever the user throws at it. Preferably I'd like the grid to only calculate if there is a number in the applicable text boxes, otherwise it ignores the calculation and you can type anything in a cell - letters, zeros, leave it blank, it don't matter. I tried message boxes and it is a pain because they pop up when you make a new row and I just think they are annoying. I can get it to work most of the time using ISDBNULL or ISNUMERIC but some zeros still slip through and saying =0 or <1 is like saying "null" which will make it fire when a new row is added.
I know, it sounds more like an excel spreadsheet than a database. Not really a wise idea for my first ever program but hey, swing for the fences right :) Thanks for helping guys.