Using Visual Basic to Automate Your Database 191 provides immediate assistance when you're writing code, and the Object Browser and the online help lead you to examples you can learn from and adapt. You can use the Immediate window to test code as you write it, and the Visual Basic Editor itself can be set up to alert you to mistakes so that you don't get far off track. Q&A Q1: A1: What's the difference between an object and a collection? A collection is a kind of object. Collections have properties and methods as other objects do. Collections provide a way to act on a set of the same type of object. If I think the type of data a variable stores will change when my code runs, should I just use the Variant data type, or can I convert one data type to another? You can convert one data type to another by using Visual Basic functions such as CStr, which converts an expression to a string, or CCur, which converts an expression to currency. If you want to learn more about these functions, search for "Type Conversion Functions" in the Visual Basic online help. I'm not clear when to use For...Next and when to use For Each... Q2: A2: Q3: A3: Next. Use For...Next when you know how many times you want the state- ments in your loop to run. For...Next uses a counter variable to count the number of times the statements run. Use For Each...