Hi
I use Access2002
I have created a simple form with 3 parameter UserID, Password &
Database
When a user enters values into these text boxes a passthrough query to
a Sybase database is envoked with the connection string set to the
form parameters
My problem is that when an invalid username, password or database
string is entered the passthrough query still works even though
looking at the connect property this has changed to the form input
Any ideas?? - this is driving me mad!! Here is the function I wrote:
Call create_qry("qpt_IRRollIRCurve", "exec IRRollIRCurve", strCon)
Function create_qry(strQryName As String, strSQL As String, Optional
strCon As String)
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Set db = CurrentDb
Set qdf = db.CreateQueryDef(strQryName)
If IsNull(strCon) = False Then
With qdf
.Connect = strCon
.SQL = strSQL
End With
Else
End If
Set qdf = Nothing
Set db = Nothing
Regards Kay