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

datatype money to varchar not allowed 1

Status
Not open for further replies.

sk1hotpepr

Technical User
Jul 11, 2003
63
US
I'm trying to upsize my access database to sql database but my one query won't go through. The error tells me to use the convert function for the query. Unfortunately, I'm not sure where to use it, or if there's a way that I won't need to. Here are some pieces of the code if it will help. Any help would be appreciated. Oh, and the table that contains the values are type currency.

Dim gcab, sab, mab, pab, eab, fpab, aab As String
'...

gcab = "(GCActBid Like '*' OR GCActBid IS NULL) "
sab = "(SiteActBid Like '*' OR SiteActBid IS NULL) "
mab = "(MechActBid Like '*' OR MechActBid IS NULL) "
pab = "(PlumbingActBid Like '*' OR PlumbingActBid IS NULL) "
eab = "(ElecActBid Like '*' OR ElecActBid IS NULL) "
fpab = "(FPActBid Like '*' OR FPActBid IS NULL) "
aab = "(AsbActBid Like '*' OR AsbActBid IS NULL) "
'...

"WHERE [Change Order Table].ProjectNumber" & myText & "AND ProjectName" & pnom & "AND " & cid & _
"AND " & acost & "AND " & pcost & "AND " & reason & "AND " & sdcost & _
"AND " & gacost & "AND " & gcab & "AND " & sab & "AND " & mab & _
"AND " & pab & "AND " & eab & "AND " & fpab & "AND " & aab & _

'...
 
The Like operator is not suitable for numeric fields.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
THANK Y0U, THANK YOU!

I was hoping it was something simple. The error log suggested using convert...ugh.

[laughtears]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top