Problem with IN clause

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

I get a message back "Not a valid password". But I know
the password is correct. What is wrong with this sql
statement. There must be something structurally incorrect
with the password portion.

Dim sqlUnionQry As String
sqlUnionQry = "Select * From Vendors
IN 'C:\History.mdb' 'PWD=pwhistory';"
Me.RecordSource = sqlUnionQry


Thank you for your help.

Steven
 
Steven said:
I get a message back "Not a valid password". But I know
the password is correct. What is wrong with this sql
statement. There must be something structurally incorrect
with the password portion.

Dim sqlUnionQry As String
sqlUnionQry = "Select * From Vendors
IN 'C:\History.mdb' 'PWD=pwhistory';"
Me.RecordSource = sqlUnionQry

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe the format for including the password in the IN statement
is:

IN "C:\History.mdb;PWD=pwhistory"

- --
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQFD1jIechKqOuFEgEQJpswCgpH3vdwSncA7JA5xFQH07I/chY+sAn34H
5ei82myKTs4Kdt8o6v6pAZ8u
=wzla
-----END PGP SIGNATURE-----
 
Try this:

sqlUnionQry = "Select * From Vendors
IN '' [MS Access;PWD=pwhistory;DATABASE=C:\History.mdb];"


--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
You are really good. Thank you for your help.
-----Original Message-----
Try this:

sqlUnionQry = "Select * From Vendors
IN '' [MS Access;PWD=pwhistory;DATABASE=C:\History.mdb];"


--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
I get a message back "Not a valid password". But I know
the password is correct. What is wrong with this sql
statement. There must be something structurally incorrect
with the password portion.

Dim sqlUnionQry As String
sqlUnionQry = "Select * From Vendors
IN 'C:\History.mdb' 'PWD=pwhistory';"
Me.RecordSource = sqlUnionQry


Thank you for your help.

Steven


.
 
Back
Top