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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Davg returns strange character

Status
Not open for further replies.

matteaster

Technical User
Dec 12, 2006
4
US
Code:
prcRating = DAvg(vepField, tblName, "[Date] BETWEEN " & TextToDate2 & " AND " & TextFromDate2)

returns the asccii character #218: "?" or at least that is what it looks like to me. Any help is appriciated!

 
Just as i thought the forums won't display that character which should have appeared where the ? is above. Sorry.
 
oops, i think I answered my own question. That character must somehow signify Horizontal Tab which a following line of code changes the variable too if it is Null, now i just have to find the reason its null? Thanks for you time, Kinda sorry I posted anything now ><.
 
Ok my code was fine EXCEPT I forgot that dates are surrounded by #'s in SQL. The the really real code should have looked like this:

Code:
prcRating = DAvg(vepField, tblName, "[Date] BETWEEN #" & TextFromDate2 & "# AND #" & TextToDate2 & "#")

Just in case anyone goes stupid like i did, they can search this post and maybe find the answer before posting like I did.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top