S
Scott
Hello,
I am having a problem with my access DB. I have created a simple button
that runs the following code:
----------------------------------------------------
Dim strSQL As String, ufr As Recordset, wrk As String
Dim sqldb As Database
Set sqldb = DBEngine.Workspaces(0).Databases(0)
strSQL = "SELECT [User_Settings].* FROM [User_Settings] WHERE ("
wrk = "[User_Settings].[UserAccessID] = '" & CurrentUser() & "'"
strSQL = strSQL & wrk & ");"
Set ufr = sqldb.OpenRecordset(strSQL, DB_OPEN_SNAPSHOT)
Text1.Value = ufr("passwordExpireDate")
----------------------------------------------------
When I click the button I get the following error:
----------------------------------------------------
Run-time error '3000'
Reserved error (-7776); there is no message for this error.
----------------------------------------------------
When I click debug it sends me to the line "Set ufr =
sqldb.OpenRecordset(strSQL, DB_OPEN_SNAPSHOT)". But when I F8 through the
code everything works and continues to work until the access DB is open
again. Any help or comments on this behavior would be greatly appreciated.
Thanks,
-Scott
I am having a problem with my access DB. I have created a simple button
that runs the following code:
----------------------------------------------------
Dim strSQL As String, ufr As Recordset, wrk As String
Dim sqldb As Database
Set sqldb = DBEngine.Workspaces(0).Databases(0)
strSQL = "SELECT [User_Settings].* FROM [User_Settings] WHERE ("
wrk = "[User_Settings].[UserAccessID] = '" & CurrentUser() & "'"
strSQL = strSQL & wrk & ");"
Set ufr = sqldb.OpenRecordset(strSQL, DB_OPEN_SNAPSHOT)
Text1.Value = ufr("passwordExpireDate")
----------------------------------------------------
When I click the button I get the following error:
----------------------------------------------------
Run-time error '3000'
Reserved error (-7776); there is no message for this error.
----------------------------------------------------
When I click debug it sends me to the line "Set ufr =
sqldb.OpenRecordset(strSQL, DB_OPEN_SNAPSHOT)". But when I F8 through the
code everything works and continues to work until the access DB is open
again. Any help or comments on this behavior would be greatly appreciated.
Thanks,
-Scott