Labels, Text Boxes and Command Buttons
Label - A control that is used to display text as a caption. Labels cannot be altered by the user. They are simply used to display headings and are a result of processing, as well as other information on a form. Labels begin with a lbl prefix.
Examples of labels:
Text Box - Control that is used to enter information onto a form. Text boxes can have focus, and are the primary means of providing input to a project in Visual Basic. Text boxes begin with the prefix of txt
Examples of Text Boxes:
Command Buttons - Control that is used to activate a procedure. When a command button is clicked or activated using an access key, an event will take place (the code behind the command button is executed.) Command buttons begin with the prefix cmd
Types of Errors
Special Functions and Methods
VAL - A function that will convert a string to a numeric value. It will begin with the far left character of the string. If that character is a numeric digit, decimal point or sign, VAL will convert the character to a numeric value, and continue to the next character. Once a non-numeric character is found, the VAL function will stop.
PrintForm - A method that will print the current form on the printer. This is executed during run-time.
FORMAT - This is used to format a variable. Variables can be formatted as fixed numbers, currency and percents.
FormatCurrency - This function will take a number and format it as currency with two decimal places and a $ sign. There is only one argument, the number you want to format.
FormatNumber - This function will format a number as a decimal with a set number of decimal places. The first argument is the number you want to format. The second is the number of decimal places you want the number to have.
FormatPercent - This function will take the number, and format it as a percent by multiplying the number by 100 and adding a percent sign to the end. By default, the number will be rounded to zero decimal places unless you specify a second argument.
FormatDate and Time - This function will take a string and format it as a Date, Time or both. The first argument is the date or time to be formatted. The second argument is the format of date/time you decide to use.
No Comments for this page.