In the private sub Command15_Click(), how come you did not use the dim statment to define the data type for the R variable for the line: R = inputbox("The balance due on this...)
Is the default data type for the inputbox a variant data type?
Reply from Richard Rost:
Bad habit. You don't HAVE to DIM all your variables, but you should. Yes, if you don't DIM them, you end up with a variant, but VB is pretty good at realizing what kind of data you're working with. It's not like C/C++ where you have to DIM everything. That's what that "option explicit" statement does.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Payables Seminar.