Data Type Conversion

Up Access Objects Events Variables Data Type Conversion Control Flow User-defined functions DoCmd Error Handling Homework

Home
Intoduction VBA
Visual Basic Editor
VBA Foundations
VBA for Access Form
VBA for ADO
Useful Links

 

VB handles a lot of data type conversion for you in the background.  For example, the text box control is quite clearly a String data type.  However, you can assign a number or a date/time to the text box.  You can also assign a string variable (as long as it is a "number") to an integer data type.

To make your VB codes more standardized and for future maintenance, you can use the built-in conversion functions  to convert data from one type to another. The conversion functions supported by VB are:
CBool CByte CCur CDate
CDbl Chr CInt CLng
CSng      

Exercise 1

Home | Access Objects | Events | Variables | Data Type Conversion | Control Flow | User-defined functions | DoCmd | Error Handling | Homework

This site was last updated 08/29/05