MichaelRed,
I am not "shooting down" or refusing to consider any of the suggestions that have been presented to me here (or in any other thread), it is just that we here have tried these methods before and have found them not to work reliably within the infastructure of our network.
Jeremy,
What you pose is what I really wish we here had the capability of doing. It would make my life and the life of our users so much easier. As it stands now, users in this department have the very cumbersome task of opening up one database to do one process then having to switch to other databases for other processes. This is not the way I feel to get the best out of technology, nor is it the best way to get the most out of production. But I, here, am not in a position to implement those technical changes that we so desperately need. I have placed my concerns, suggestions, and ideas to the "powers that be", but only to be placed onto def ears. Therefore, I am stuck trying to increase the performance with what I've got to the best of my ablility.
Some background information:
We currently use IBM PC 300PL machines running Win95. We logon to the network with Novell, although I am not sure of the release. The IBM's have classic pentium processor which, as far as I can determine, are no more then 100 to 250 Mhz and most of these machines only have 32 Meg of RAM. The problem that we run into with Access dbs (which are all located on the server) is that if a table contains upto 100 thousand records, performance really suffers. It also suffers when more then one (1) user connects to the same database at one time. I do have an archiving processes that archives old data from all the database an stores that onto one db on a daily basis, but because of out current retention requirments, we have easily reach 100 thousand record on more then a dozen databases.
Let me tell you that it is a real nightmare here!
That is why I have come to those here with this question. Is there a more efficient way of making this process work within the constraints I have stated above.
All production processes get done on 22 databases, which are all identical except for the state that the data reflects. I am submitting my module for your consideration. I am only using 4 database as a test environment, which is why I really want to stream-line this process as much as possible. Just know, I am not against linking all of these tables to this reporting database; its just that I have found that if I can do the majority of these kinds of processes in the background through code, performance seems to increase (some!)
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
Dim dbMstr As Database, dbState As Database
Dim rsMstr As Recordset, rsState As Recordset
Dim dbFileID As Byte, dbPathID As Byte, a As Byte
Dim strSQL As String, mstrStateCondition As String
Dim found As Boolean
Public Function testRecSetOption()
dbPathID = 0
found = False
Set dbMstr = CurrentDb()
For a = 1 To 4
Select Case a
Case 1
dbFileID = 5
mstrStateCondition = "WHERE STATE LIKE 'N*'"
Case 2
dbFileID = 8
mstrStateCondition = "WHERE STATE = 'GA'"
Case 3
dbFileID = 13
mstrStateCondition = "WHERE STATE = 'TX'"
Case 4
dbFileID = 14
mstrStateCondition = "WHERE STATE = 'CO'"
End Select
mstrStateCondition = mstrStateCondition & " AND OUT_CODE IS NULL"
strSQL = "SELECT FC, ATM, DATE, AMOUNT, OUT_CODE " _
& "FROM OUTAGETOTAL " & mstrStateCondition & ""
Set rsMstr = dbMstr.OpenRecordset(strSQL)
Set dbState = OpenDatabase(DBLocations(dbFileID, dbPathID))
strSQL = "SELECT CC, [DOC NO], [PST DATE], NET, REMARKS " _
& "FROM TBLRECONPSTNGS " _
& "WHERE DESCRIPTION LIKE '*VS*' AND REMARKS IS NOT NULL"
Set rsState = dbState.OpenRecordset(strSQL)
If rsMstr.RecordCount <> 0 Then
rsMstr.MoveFirst
Do Until rsMstr.EOF
rsState.MoveFirst
Do Until found = True
If rsState.EOF = False Then
If rsMstr!FC = rsState!CC And rsMstr!ATM = rsState![DOC NO] _
And rsMstr!Date = rsState![Pst Date] And rsMstr!AMOUNT = rsState!NET Then
rsMstr.Edit
rsMstr!out_code = rsState!remarks
rsMstr.Update
found = True
End If
rsState.MoveNext
Else
found = True
End If
Loop
rsMstr.MoveNext
found = False
Loop
End If
Set rsMstr = Nothing
Set rsState = Nothing
Set dbState = Nothing
Next a
Set dbMstr = Nothing
MsgBox "Done"
End Function
Thanks again to all of you.
ERM