Log in

View Full Version : [SOLVED:] Database Weirdness



jauner
11-28-2005, 07:58 AM
I am using following code to read questions into an array from a table:


Function ReadQuestions(ByVal strCoreService As String, strAuditType As String, strAccountType As String) As Variant
Dim dbs As Database
Dim rst As Recordset, rst2 As Recordset
Dim wrkjet As Workspace
Dim strQuestions(10) As String
Dim x As Integer
x = 0
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblQuestions", dbOpenDynaset)
rst.Filter = "[CoreService] = '" & strCoreService & "' AND [AuditType] = '" & strAuditType & "' AND " _
& "[AccountType] = '" & strAccountType & "'"
Set rst2 = rst.OpenRecordset
With rst2
Do While Not rst2.EOF
strQuestions(x) = .Fields("Question")
rst2.MoveNext
x = x + 1
Loop
End With
'Close Recordset and Database Connections
rst.Close
rst2.Close
dbs.Close
ReadQuestions = strQuestions


For some reason when I change one of the questions it is still remembering the old version even if I exit Access. The tables are linked from another access database.

Any ideas?

jauner
11-28-2005, 08:22 AM
I figured out my problem. It was an update issue and I fixed sorry.