DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Community Introductions (http://www.daniweb.com/forums/forum165.html)
-   -   Hi from JohnandDixie (http://www.daniweb.com/forums/thread133284.html)

JohnandDixie Jul 8th, 2008 1:49 pm
Hi from JohnandDixie
 
Hi my name is John from I U.K.. Have only recently got back into progarmming following the death of my wife in April this year, so could really do with help on a few things I am trying at the mo!
Other than computers my other interests are my lovely American Bulldod, Dixie, music(Bowie/Pistols/Nirvana/Paul Weller and all things goth!!), fishing and long walks in the countryside.. Anyway, the immediate problem I have is building an SQL string with possible parameters, but I get a missing operator error when I try and open the recordset. The code is as follows. The choice parameter is a radio button choice. I haven't got as far as passing dates yet. Please could someone help.

Kind Regards
John

'---------------------------------------------------------------------------
' Function: strbuildSQLstr
' Purpose: Build SQL String to retrieve ADO Recordset
' Paramters: strChoice- string(Good or Bad),strStart- string(start date)
' strEnd - string( End Date)
' Returns: String - SQL Statement build with parameters passed
'---------------------------------------------------------------------------
Function strbuildSQLstr(strChoice As String) As String
Dim strtemp As String

strtemp = "Select * from SizeRange Where Style =" & "'" & txtStyle & "'"
If strChoice > "" Then strtemp = strtemp & "'" & " and WHERE type =" & "'" & strChoice & "'"

' return the SQL String
strbuildSQLstr = strtemp & " " & "ORDER by Date"

MakeMoneyOnline Jul 8th, 2008 5:25 pm
Re: Hi from JohnandDixie
 
Welcome to the forums John.
Glad to have you here!

selfhelpebooks Jul 8th, 2008 5:45 pm
Re: Hi from JohnandDixie
 
Hi John:
Welcome.
Feel free to post your inquiry in the appropriate forum here.

zandiago Jul 8th, 2008 7:39 pm
Re: Hi from JohnandDixie
 
Nice of you to join, hope you'll be with us for a lifetime! Sorry to hear about the passing of your wife. We'll be willing to help, once you post your query in the programming section of this forum.

sreein1986 Jul 9th, 2008 4:17 am
Re: Hi from JohnandDixie
 
Welcome to Daniweb forums....


All times are GMT -4. The time now is 5:56 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC