Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2006

Tip: Looking for answers? Try searching our database.

Explicitly declare the variable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dan @BCBS - 31 Mar 2006 15:28 GMT
My database is ODBC linked to an SQL database the DSN is QMSPRD.
I use Option Explicit, then in my code I add "QMS.addQMSPRD"

The error message tells me I need to "Explicitly declare the variable"

How do I do that????

Thanks
Tom Ellison - 31 Mar 2006 17:02 GMT
Dear Dan:

In your apparent function call:

QMS.addQMSPRD

there are two things to resolve.  The initial QMS would be an object, so it
is a reference to an object variable.  This should be both declared and
initialized.

addQMSPRD would be a method of that object class.  Do you have that declared
somewhere as well.

Are you the author of the software including the QMS object and its methods?
If not, talk to the one who did, or read the manual he wrote.

Tom Ellison

> My database is ODBC linked to an SQL database the DSN is QMSPRD.
> I use Option Explicit, then in my code I add "QMS.addQMSPRD"
[quoted text clipped - 4 lines]
>
> Thanks
Dan @BCBS - 31 Mar 2006 18:15 GMT
I was only asking how to declare a veriable "Explicitly"

> Dear Dan:
>
[quoted text clipped - 22 lines]
> >
> > Thanks
Tom Ellison - 31 Mar 2006 18:26 GMT
Dear Dan:

In my previous post, I stated that you must declare it.  That would be done
using the DECLARE keyword.

It remains essential that you also initialize it.  If you don't you'll just
get a different error message.

The advice about reading the manual on this function, or consulting the
person who wrote it, still stands.

When you declare the QMS object, you must declare it as being an object of a
certain type.  No one unfamiliar with the custom software you are addressing
could know what that is.  You cannot declare it, or initialize it, without
instructions on the custom object it addresses.

Take my advice or leave it.

No one is going to know how to declare and initialize a custom object unless
they are familiar with the object.  That's why manuals and documentation are
essential.

Tom Ellison

>I was only asking how to declare a veriable "Explicitly"
>
[quoted text clipped - 27 lines]
>> >
>> > Thanks
Dan @BCBS - 31 Mar 2006 18:42 GMT
Guess I'm a little on edge about taking over someone elses database.
The person is no longer with the company and did not document very well.

My concern is that the program runs fine without "QMS.addQMSPRD"

Let me explain:  I re-linked all the tables to a new SQL Server Database
(for security reasons) I had to change the DSN name.  
The old program runs fine with this code to the old SQL db.  But when I
change the connections to the new SQL db I cannot include "QMS.addQMSPRD"..

I realise that does not give you much information to help, but it's all I
have.

> Dear Dan:
>
[quoted text clipped - 51 lines]
> >> >
> >> > Thanks
Tom Ellison - 31 Mar 2006 19:26 GMT
Dear Dan:

That's not good news.  You may need to read, understand, and document
everything you have before you can proceed to use it and maintain it, let
alone proceed with new development.  You're going to need considerable
expertise in SQL Server T-SQL coding.

Tom Ellison

> Guess I'm a little on edge about taking over someone elses database.
> The person is no longer with the company and did not document very well.
[quoted text clipped - 75 lines]
>> >> >
>> >> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.