PC Review


Reply
 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      4th Oct 2007
Hi all I'm really at a loss any help would be great
Thanks Mike

I have SQL that works with no problem

strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
MultVend.VEND_DESC " _
& " FROM MultVend " _
& " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "

and this will NOT
Where myString = me.textbox1.value

strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
MultVend.VEND_DESC " _
& " FROM MultVend " _
& " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      4th Oct 2007
I'm think its because the field is text ? but still can't get it to work.

"Mike" wrote:

> Hi all I'm really at a loss any help would be great
> Thanks Mike
>
> I have SQL that works with no problem
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> MultVend.VEND_DESC " _
> & " FROM MultVend " _
> & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
>
> and this will NOT
> Where myString = me.textbox1.value
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> MultVend.VEND_DESC " _
> & " FROM MultVend " _
> & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "

 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      4th Oct 2007
One of these 3 should work, probably the last:

strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
"MultVend.VEND_DESC " & _
"FROM MultVend " & _
"WHERE (((MultVend.VEND_PART_NUM) = " & _
myString & ")); "

strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
"MultVend.VEND_DESC " & _
"FROM MultVend " & _
"WHERE (((MultVend.VEND_PART_NUM) = " & _
Chr(34) & myString & Chr(34) & ")); "

strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
"MultVend.VEND_DESC " & _
"FROM MultVend " & _
"WHERE (((MultVend.VEND_PART_NUM) = " & _
Chr(39) & myString & Chr(39) & ")); "


RBS


"Mike" <(E-Mail Removed)> wrote in message
news:71E7A99F-637B-4A6C-BB22-(E-Mail Removed)...
> Hi all I'm really at a loss any help would be great
> Thanks Mike
>
> I have SQL that works with no problem
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> MultVend.VEND_DESC " _
> & " FROM MultVend " _
> & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
>
> and this will NOT
> Where myString = me.textbox1.value
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> MultVend.VEND_DESC " _
> & " FROM MultVend " _
> & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "


 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      4th Oct 2007
Thanks but just got it with this i had to have 3 """ instead of 2 ""
WHERE (((MultVend.VEND_PART_NUM)=""" & myString & """));
By the way what does the Chr(34) do ?

"RB Smissaert" wrote:

> One of these 3 should work, probably the last:
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> "MultVend.VEND_DESC " & _
> "FROM MultVend " & _
> "WHERE (((MultVend.VEND_PART_NUM) = " & _
> myString & ")); "
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> "MultVend.VEND_DESC " & _
> "FROM MultVend " & _
> "WHERE (((MultVend.VEND_PART_NUM) = " & _
> Chr(34) & myString & Chr(34) & ")); "
>
> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> "MultVend.VEND_DESC " & _
> "FROM MultVend " & _
> "WHERE (((MultVend.VEND_PART_NUM) = " & _
> Chr(39) & myString & Chr(39) & ")); "
>
>
> RBS
>
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:71E7A99F-637B-4A6C-BB22-(E-Mail Removed)...
> > Hi all I'm really at a loss any help would be great
> > Thanks Mike
> >
> > I have SQL that works with no problem
> >
> > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> > MultVend.VEND_DESC " _
> > & " FROM MultVend " _
> > & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
> >
> > and this will NOT
> > Where myString = me.textbox1.value
> >
> > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> > MultVend.VEND_DESC " _
> > & " FROM MultVend " _
> > & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "

>
>

 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      4th Oct 2007
> By the way what does the Chr(34) do ?

That is the double-quote character.
Chr(39) is a single quote.
If your 3 double quotes work then the one with Chr(34) may also work.
I think it gets less confusing if you combining single or double quotes to
use
the character codes instead, so Chr(34) etc.

RBS


"Mike" <(E-Mail Removed)> wrote in message
newsBD910EC-F5D0-4537-8D05-(E-Mail Removed)...
> Thanks but just got it with this i had to have 3 """ instead of 2 ""
> WHERE (((MultVend.VEND_PART_NUM)=""" & myString & """));
> By the way what does the Chr(34) do ?
>
> "RB Smissaert" wrote:
>
>> One of these 3 should work, probably the last:
>>
>> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
>> "MultVend.VEND_DESC " & _
>> "FROM MultVend " & _
>> "WHERE (((MultVend.VEND_PART_NUM) = " & _
>> myString & ")); "
>>
>> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
>> "MultVend.VEND_DESC " & _
>> "FROM MultVend " & _
>> "WHERE (((MultVend.VEND_PART_NUM) = " & _
>> Chr(34) & myString & Chr(34) & ")); "
>>
>> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
>> "MultVend.VEND_DESC " & _
>> "FROM MultVend " & _
>> "WHERE (((MultVend.VEND_PART_NUM) = " & _
>> Chr(39) & myString & Chr(39) & ")); "
>>
>>
>> RBS
>>
>>
>> "Mike" <(E-Mail Removed)> wrote in message
>> news:71E7A99F-637B-4A6C-BB22-(E-Mail Removed)...
>> > Hi all I'm really at a loss any help would be great
>> > Thanks Mike
>> >
>> > I have SQL that works with no problem
>> >
>> > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
>> > MultVend.VEND_DESC " _
>> > & " FROM MultVend " _
>> > & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
>> >
>> > and this will NOT
>> > Where myString = me.textbox1.value
>> >
>> > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
>> > MultVend.VEND_DESC " _
>> > & " FROM MultVend " _
>> > & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "

>>
>>


 
Reply With Quote
 
PaulD
Guest
Posts: n/a
 
      4th Oct 2007
FYI single quotes ' work also

so this should work
" WHERE (((MultVend.VEND_PART_NUM)='" & myString & "')); "

"Mike" <(E-Mail Removed)> wrote in message
newsBD910EC-F5D0-4537-8D05-(E-Mail Removed)...
: Thanks but just got it with this i had to have 3 """ instead of 2 ""
: WHERE (((MultVend.VEND_PART_NUM)=""" & myString & """));
: By the way what does the Chr(34) do ?
:
: "RB Smissaert" wrote:
:
: > One of these 3 should work, probably the last:
: >
: > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
: > "MultVend.VEND_DESC " & _
: > "FROM MultVend " & _
: > "WHERE (((MultVend.VEND_PART_NUM) = " & _
: > myString & ")); "
: >
: > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
: > "MultVend.VEND_DESC " & _
: > "FROM MultVend " & _
: > "WHERE (((MultVend.VEND_PART_NUM) = " & _
: > Chr(34) & myString & Chr(34) & ")); "
: >
: > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
: > "MultVend.VEND_DESC " & _
: > "FROM MultVend " & _
: > "WHERE (((MultVend.VEND_PART_NUM) = " & _
: > Chr(39) & myString & Chr(39) & ")); "
: >
: >
: > RBS
: >
: >
: > "Mike" <(E-Mail Removed)> wrote in message
: > news:71E7A99F-637B-4A6C-BB22-(E-Mail Removed)...
: > > Hi all I'm really at a loss any help would be great
: > > Thanks Mike
: > >
: > > I have SQL that works with no problem
: > >
: > > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
: > > MultVend.VEND_DESC " _
: > > & " FROM MultVend " _
: > > & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
: > >
: > > and this will NOT
: > > Where myString = me.textbox1.value
: > >
: > > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
: > > MultVend.VEND_DESC " _
: > > & " FROM MultVend " _
: > > & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "
: >
: >


 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      4th Oct 2007
Yes, that is the Chr(39)

RBS


"PaulD" <nospam> wrote in message
news:(E-Mail Removed)...
> FYI single quotes ' work also
>
> so this should work
> " WHERE (((MultVend.VEND_PART_NUM)='" & myString & "')); "
>
> "Mike" <(E-Mail Removed)> wrote in message
> newsBD910EC-F5D0-4537-8D05-(E-Mail Removed)...
> : Thanks but just got it with this i had to have 3 """ instead of 2 ""
> : WHERE (((MultVend.VEND_PART_NUM)=""" & myString & """));
> : By the way what does the Chr(34) do ?
> :
> : "RB Smissaert" wrote:
> :
> : > One of these 3 should work, probably the last:
> : >
> : > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> : > "MultVend.VEND_DESC " & _
> : > "FROM MultVend " & _
> : > "WHERE (((MultVend.VEND_PART_NUM) = " & _
> : > myString & ")); "
> : >
> : > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> : > "MultVend.VEND_DESC " & _
> : > "FROM MultVend " & _
> : > "WHERE (((MultVend.VEND_PART_NUM) = " & _
> : > Chr(34) & myString & Chr(34) & ")); "
> : >
> : > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> : > "MultVend.VEND_DESC " & _
> : > "FROM MultVend " & _
> : > "WHERE (((MultVend.VEND_PART_NUM) = " & _
> : > Chr(39) & myString & Chr(39) & ")); "
> : >
> : >
> : > RBS
> : >
> : >
> : > "Mike" <(E-Mail Removed)> wrote in message
> : > news:71E7A99F-637B-4A6C-BB22-(E-Mail Removed)...
> : > > Hi all I'm really at a loss any help would be great
> : > > Thanks Mike
> : > >
> : > > I have SQL that works with no problem
> : > >
> : > > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> : > > MultVend.VEND_DESC " _
> : > > & " FROM MultVend " _
> : > > & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
> : > >
> : > > and this will NOT
> : > > Where myString = me.textbox1.value
> : > >
> : > > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> : > > MultVend.VEND_DESC " _
> : > > & " FROM MultVend " _
> : > > & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "
> : >
> : >
>
>


 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      4th Oct 2007
Thanks RD
I have been at coding for about 8 months at the school of 9pm till 3am LOL
Still learning and thanks for the lesson

"RB Smissaert" wrote:

> > By the way what does the Chr(34) do ?

>
> That is the double-quote character.
> Chr(39) is a single quote.
> If your 3 double quotes work then the one with Chr(34) may also work.
> I think it gets less confusing if you combining single or double quotes to
> use
> the character codes instead, so Chr(34) etc.
>
> RBS
>
>
> "Mike" <(E-Mail Removed)> wrote in message
> newsBD910EC-F5D0-4537-8D05-(E-Mail Removed)...
> > Thanks but just got it with this i had to have 3 """ instead of 2 ""
> > WHERE (((MultVend.VEND_PART_NUM)=""" & myString & """));
> > By the way what does the Chr(34) do ?
> >
> > "RB Smissaert" wrote:
> >
> >> One of these 3 should work, probably the last:
> >>
> >> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> >> "MultVend.VEND_DESC " & _
> >> "FROM MultVend " & _
> >> "WHERE (((MultVend.VEND_PART_NUM) = " & _
> >> myString & ")); "
> >>
> >> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> >> "MultVend.VEND_DESC " & _
> >> "FROM MultVend " & _
> >> "WHERE (((MultVend.VEND_PART_NUM) = " & _
> >> Chr(34) & myString & Chr(34) & ")); "
> >>
> >> strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM, " & _
> >> "MultVend.VEND_DESC " & _
> >> "FROM MultVend " & _
> >> "WHERE (((MultVend.VEND_PART_NUM) = " & _
> >> Chr(39) & myString & Chr(39) & ")); "
> >>
> >>
> >> RBS
> >>
> >>
> >> "Mike" <(E-Mail Removed)> wrote in message
> >> news:71E7A99F-637B-4A6C-BB22-(E-Mail Removed)...
> >> > Hi all I'm really at a loss any help would be great
> >> > Thanks Mike
> >> >
> >> > I have SQL that works with no problem
> >> >
> >> > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> >> > MultVend.VEND_DESC " _
> >> > & " FROM MultVend " _
> >> > & " WHERE (((MultVend.VEND_PART_NUM)=""14002"")); "
> >> >
> >> > and this will NOT
> >> > Where myString = me.textbox1.value
> >> >
> >> > strSQL1 = "SELECT MultVend.VENDOR_ID, MultVend.VEND_PART_NUM,
> >> > MultVend.VEND_DESC " _
> >> > & " FROM MultVend " _
> >> > & " WHERE (((MultVend.VEND_PART_NUM)=" & myString & ")); "
> >>
> >>

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:37 AM.