Home All Groups Group Topic Archive Search About

Sub or Function is not defined

Author
10 Mar 2006 5:36 PM
Chris
I am working on a db and I have a form and on this form I have a button that
would perform a Run a SQL script in this SQL script i have a “where” clause

When I click on the button it takes me back to the code and the “where” is
highlighted and I am getting a compile error “Sub or Function is not Defined”

How do I handle this error?


Thanks

Author
10 Mar 2006 5:44 PM
Bob Butler
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:0AEAD160-8999-47F4-8CCD-0AD464AD1432@microsoft.com
> I am working on a db and I have a form and on this form I have a
> button that would perform a Run a SQL script in this SQL script i
> have a “where” clause
>
> When I click on the button it takes me back to the code and the
> “where” is highlighted and I am getting a compile error “Sub or
> Function is not Defined”
>
> How do I handle this error?

not by multiposting, that's for sure

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Author
10 Mar 2006 5:52 PM
Chris
Bob,

What are you talking about


Show quoteHide quote
"Bob Butler" wrote:

> "Chris" <Ch***@discussions.microsoft.com> wrote in message
> news:0AEAD160-8999-47F4-8CCD-0AD464AD1432@microsoft.com
> > I am working on a db and I have a form and on this form I have a
> > button that would perform a Run a SQL script in this SQL script i
> > have a “where” clause
> >
> > When I click on the button it takes me back to the code and the
> > “where” is highlighted and I am getting a compile error “Sub or
> > Function is not Defined”
> >
> > How do I handle this error?
>
> not by multiposting, that's for sure
>
> --
> Reply to the group so all can participate
> VB.Net: "Fool me once..."
>
>
Author
13 Mar 2006 9:20 AM
Jan Hyde
Chris <Ch***@discussions.microsoft.com>'s wild thoughts were
released on Fri, 10 Mar 2006 09:52:28 -0800 bearing the
following fruit:

>Bob,
>
>What are you talking about

Look up 'multiposting' and 'crossposting'

J

Show quoteHide quote
>
>"Bob Butler" wrote:
>
>> "Chris" <Ch***@discussions.microsoft.com> wrote in message
>> news:0AEAD160-8999-47F4-8CCD-0AD464AD1432@microsoft.com
>> > I am working on a db and I have a form and on this form I have a
>> > button that would perform a Run a SQL script in this SQL script i
>> > have a “where” clause
>> >
>> > When I click on the button it takes me back to the code and the
>> > “where” is highlighted and I am getting a compile error “Sub or
>> > Function is not Defined”
>> >
>> > How do I handle this error?
>>
>> not by multiposting, that's for sure
>>
>> --
>> Reply to the group so all can participate
>> VB.Net: "Fool me once..."
>>
>>


Jan Hyde (VB MVP)

--
A friend of mine confused her valium with her birth control pills.
She had 14 kids, but she doesn't really care.

(Club Jokes)
Author
10 Mar 2006 6:15 PM
Ken Halter
Show quote Hide quote
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:0AEAD160-8999-47F4-8CCD-0AD464AD1432@microsoft.com...
>I am working on a db and I have a form and on this form I have a button
>that
> would perform a Run a SQL script in this SQL script i have a "where"
> clause
>
> When I click on the button it takes me back to the code and the "where" is
> highlighted and I am getting a compile error "Sub or Function is not
> Defined"
>
> How do I handle this error?
>
>
> Thanks

I may not be visiting the other group(s) you've posted to so I don't see
another copy but, if you've posted to multiple groups by sending the same
question to each, one at a time, you're multiposting and that's not good.
Crossposting is the way to go.. that way, all answers to your question show
up in all groups on the crosspost list instead of the multiple threads you'd
get when multiposting...

Anyway.... If you're getting this error in VB6, it's because VB has no idea
what a SQL statement is (or what a Where clause is). The job of verifying
SQL syntax is up to the database engine components you're working with.
Basically, it involves building a string that represents the SQL statement
and sending that off to an ADO connection/recordset/whatever object.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Author
13 Mar 2006 9:21 AM
Jan Hyde
Chris <Ch***@discussions.microsoft.com>'s wild thoughts were
released on Fri, 10 Mar 2006 09:36:30 -0800 bearing the
following fruit:

>I am working on a db and I have a form and on this form I have a button that
>would perform a Run a SQL script in this SQL script i have a “where” clause
>
>When I click on the button it takes me back to the code and the “where” is
>highlighted and I am getting a compile error “Sub or Function is not Defined”
>
>How do I handle this error?
>

Post the relevant code and highligh the line that the error
occurs on


Jan Hyde (VB MVP)

--
A friend of mine confused her valium with her birth control pills.
She had 14 kids, but she doesn't really care.

(Club Jokes)