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!

Setting String Variables to Nothing

Status
Not open for further replies.

tbaguio

Programmer
Sep 25, 2000
41
CA
I've declared variables in my code to equate a value at the beginning of a loop and wanted to "re-set" the variable to nothing at the end.

Part of it looks something like:

Code:
Dim dbs As Database
Dim rst As Recordset
Dim rstFilter As Recordset
Dim GetDate As String 

GetDate = Forms!frmMain!ActiveXCalendar.Value

Set dbs = Nothing
Set rst = Nothing
Set rstFilter = Nothing
GetDate.Value = ""

This is only excerpts of my code. Anyhow, I get an "Invalid Qualifier" message when I reset the GetDate value in this way. What's the proper way to write this line?

Any insights? [sig][/sig]
 
By referring to GetDate as GetDate.Value you are trying to reference the Vaule property of GetDate. However as GetDate is a simple string variable it does not have a valu property.

To reset to an empty string it's just GetDAte=""

WP [sig]<p>Bill Paton<br><a href=mailto:william.paton@ubsw.com>william.paton@ubsw.com</a><br><a href= [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top