ClimoC
Well-known Member
- Joined
- Aug 21, 2009
- Messages
- 584
Howdy
I've built a little app to reside on our shared-drive, which is designed to store relatively few records, and accessed by probably not more than 4-6 people at any single one time. Only one record can be Added/Edited/Deleted at a time (there are no batch delete/edit/add functions)
Here's the basics:
DB Filetype: '.accdb' - I believe it's a 2007 vintage
DB Conn Type: ADO (2.8)
ADO Connection Provider: ACE.OLEDB.12.0
All housed in an .xlam, which uses Excel's Userforms to interact with the data (seems tidier to do it here, ad I'm more familiar with them, and because there are linked pivottables and charts to the DB)
ADO CursorLocation : adUseClient
Rs's opened thusly:
Userform has search field. Search for an item in the recordset, results returned to Listbox.
Listbox_Click event fires, pulling field values into relevant Text,Combo,and Listboxes
UserformControl_Change events fire something like this:
The final step, which I haven't done just yet, is to pop in a few 'FinRS.Requery's where required, so that it gets the latest data from the table (Or, set it up to run as a time-scheduled function, every 10 seconds or so?)
Will this suffice in a Multi-User system? Do I need to introduce transactions (Begin, Commit, etc) around my batchupdates?
It's all working swimmingly now, but in a Local Desktop offline version. I want to be sure I won't run into any major issues once it goes out onto the Share-Drive and gets multi-user access.
Thanks
C
I've built a little app to reside on our shared-drive, which is designed to store relatively few records, and accessed by probably not more than 4-6 people at any single one time. Only one record can be Added/Edited/Deleted at a time (there are no batch delete/edit/add functions)
Here's the basics:
DB Filetype: '.accdb' - I believe it's a 2007 vintage
DB Conn Type: ADO (2.8)
ADO Connection Provider: ACE.OLEDB.12.0
All housed in an .xlam, which uses Excel's Userforms to interact with the data (seems tidier to do it here, ad I'm more familiar with them, and because there are linked pivottables and charts to the DB)
ADO CursorLocation : adUseClient
Rs's opened thusly:
Code:
FinRS.Open "Finance", ConnLink, adOpenStatic, adLockBatchOptimistic
Users.Open "Users", ConnLink, adOpenStatic, adLockBatchOptimistic
'etc
Userform has search field. Search for an item in the recordset, results returned to Listbox.
Listbox_Click event fires, pulling field values into relevant Text,Combo,and Listboxes
UserformControl_Change events fire something like this:
Code:
'ActiveID is a hidden label on the userform, which stores the (access')ID of the record selected in the Listbox
Private Sub NotesBox_Change()
Call FieldLookup("NotesBox", CLng(ActiveID))
End Sub
Public Function FieldLookup(ByVal CtrlName As String, ID2USE As Long)
If Not Application.EnableEvents = False Then 'Part of a solution to trigger when and when not to call certain routines for populating the userform, which has 'multipage tabs.
Select Case CtrlName
'###################
'Numeric Fields
Case "NotesBox"
FinRS.MoveFirst
FinRS.Find "FK_ID = " & ID2USE
FinRS.Fields("Notes").Value = ConsoleForm.Controls(CtrlName).Value
FinRS.UpdateBatch adAffectCurrent
Case "DeliveredDate"
'etc
The final step, which I haven't done just yet, is to pop in a few 'FinRS.Requery's where required, so that it gets the latest data from the table (Or, set it up to run as a time-scheduled function, every 10 seconds or so?)
Will this suffice in a Multi-User system? Do I need to introduce transactions (Begin, Commit, etc) around my batchupdates?
It's all working swimmingly now, but in a Local Desktop offline version. I want to be sure I won't run into any major issues once it goes out onto the Share-Drive and gets multi-user access.
Thanks
C