Wrox Programmer Forums
|
BOOK: Beginning Access VBA
This is the forum to discuss the Wrox book Beginning Access 2002 VBA by Robert Smith, Dave Sussman, Ian Blackburn, John Colby, Mark Horner, Martin Reid, Paul Turley, Helmut Watson; ISBN: 9780764544026
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2004, 04:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 Access 2000

After entering the following code I get the following error'"Compiler Error Can't Find Project or Library" Will someone assist me:(

Option Compare Database
Option Explicit

Sub VariantExample()
Dim varAnyThing As Variant


varAnyThing = 12.345
Debug.Print VarType(varAnyThing)

varAnyThing = 12.345
varAnyThing = varAnyThing & " is a number"
Debug.Print VarType(varAnyThing)

varAnyThing = 12.345
varAnyThing = varAnyThing + "10"
Debug.Print VarType(varAnyThing)

varAnyThing = 12345
Debug.Print VarType(varAnyThing)

varAnyThing = 123456
Debug.Print VarType(varAnyThing)

End Sub
Sub VariantStringTest()
Dim varFirstName As Variant
Dim varLastName As Variant
Dim varFullName As Variant

varFirstName = "Janine"
varLastName = Null

varFullName = varFirstName & varLastName
Debug.Print varFullName
End Sub
__________________
Jennifer D. Taylor
Wiley Technical Support
 
Old May 11th, 2004, 04:10 PM
Authorized User
 
Join Date: Jun 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Option Compare Database
Option Explicit

Sub VariantExample()
Dim varAnyThing As Variant

varAnyThing = 12.345
Debug.Print VarType(varAnyThing)

varAnyThing = 12.345
varAnyThing = varAnyThing & " is a number"
Debug.Print VarType(varAnyThing)

varAnyThing = 12.345
varAnyThing = varAnyThing + "10"
Debug.Print VarType(varAnyThing)

varAnyThing = 12345
Debug.Print VarType(varAnyThing)

varAnyThing = 123456
Debug.Print VarType(varAnyThing)

End Sub
Sub VariantStringTest()
Dim varAnyThing As Variant

Dim varFirstName As Variant
Dim varLastName As Variant
Dim varFullName As Variant

varFirstName = "Janine"
varLastName = Null
varFullName = varFirstName + varLastName

Debug.Print varFullName

End Sub

Jennifer D. Taylor
Wiley Technical Support





Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2000 VBA Chapter 3 Problem Pauldowsett BOOK: Beginning Access VBA 3 January 30th, 2005 03:06 PM
Chapter 17 Beginning Access 2000 VBA gracechen19 BOOK: Beginning Access VBA 0 August 23rd, 2004 04:02 PM
SQL SERVER 2000 AND ACCESS 2000 ckentebe SQL Server 2000 3 June 17th, 2004 08:50 PM
Beginning Access 2000 VBA Chapter 6: List Boxes greencw BOOK: Beginning Access VBA 1 June 13th, 2004 08:16 PM
ADE file in Access 2000 <---> Access XP ginoitalo Access 3 April 14th, 2004 09:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.