[AccessD] Type Mismatch

Martin Caro mcaro at bigpond.net.au
Sat Jun 5 17:59:44 CDT 2004


I agree - when Jim suggested declaring everything explicitly I went back and
did that.

Whilst on the subject - is there a preferred set of inclusions (and order)
in references that it is best to, at least, start a project? -  and can all
list order issues be avoided by explicit coding? - a couple of times now
issues I have had have been solved by adjustments to the reference list .

Martin



----- Original Message -----
From: "jwcolby" <jwcolby at colbyconsulting.com>
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>
Sent: Sunday, June 06, 2004 6:53 AM
Subject: RE: [AccessD] Type Mismatch


> You should explicitly declare it anyway.  It only takes a second to do and
> removes any ambiguity.
>
> John W. Colby
> www.ColbyConsulting.com
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Dettman
> Sent: Saturday, June 05, 2004 8:22 AM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Type Mismatch
>
>
> Martin,
>
>  If your not going to use both DAO and ADO, then you should uncheck one.
If
> you are going to use both, then you should start declaring everything
> explicitly:
>
>     Dim rst As DAO.Recordset
>     Dim db As DAO.Database
>
>
> Jim
> (315) 699-3443
> jimdettman at earthlink.net
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Martin Caro
> Sent: Friday, June 04, 2004 9:02 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Type Mismatch
>
>
> Thanks Stuart
>
> I didn't even consider references - I moved DAO up the list and the error
> went away
>
> Martin
>
> ----- Original Message -----
> From: "Stuart McLachlan" <stuart at lexacorp.com.pg>
> To: "Access Developers discussion and problem solving"
> <accessd at databaseadvisors.com>
> Sent: Saturday, June 05, 2004 10:17 AM
> Subject: Re: [AccessD] Type Mismatch
>
>
> > On 5 Jun 2004 at 9:41, Bigpond wrote:
> >
> > > Hi folks
> > >
> > > I'm getting a Type Mismatch (13) error on the OpenRecordset line of
> > > the
> following code
> > >
> > > Private Sub cmdTest_Click()
> > >     Dim rst As Recordset
> > >     Dim db As Database
> > >     On Error GoTo HandleErrors
> > >     Set db = CurrentDb()
> > >     Set rst = db.OpenRecordset("SELECT DISTINCT ClientTypeID FROM
> GBBClients")
> > >     .
> > >     .
> > > End Sub
> > >
> > > I have checked the table "GBBClients" and the field "ClientTypeID"
> > > is a
> number.
> > > I inserted a text field called "ClientType" into the table and the
> following line also give the same error.
> > >
> > >     Set rst = db.OpenRecordset("SELECT DISTINCT ClientType FROM
> GBBClients")
> > >
> > > Is it so obvious that I can't see it??????
> > >
> >
> > DAO/ADODB ? Do you have both referenced and if so, in what order. You
> > will get this error with an ADODB recordset.
> >
> >
> >
> >
> >
> >
> > --
> > Lexacorp Ltd
> > http://www.lexacorp.com.pg
> > Information Technology Consultancy, Software Development,System
> > Support.
> >
> >
> >
> > --
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
> --
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> --
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
> --
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list