Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Use of Null? 1

Status
Not open for further replies.

ckeener

Programmer
Dec 2, 2003
53
US
If Not IsNull(Me.cboAppr) Then
Appr = Me.cboAppr
Else
Appr = Null
End If

I am basically trying to use this as a backup process that runs on form load to back up the information in the form so that if the user wants to quit without saving the changes that may have been made, he can quit and the information that was there before can be restored. Appr is a Public variable of the string format.

If there is nothing in the txtAppr, then it returns an error saying there is an "Invalid Use of Null"

Duhhh, What am I doin wrong????

Caleb
 
You cannot assign NULL to a string. You can however, assign it a Null string.

Appr = vbNullString

or assign it an Empty String

Appr = ""

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks CajunCenturion,

vbNullString worked!!
 
You're quite welcome.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top