- Local time
- Today, 14:58
- Joined
- Jul 9, 2003
- Messages
- 16,891
i'm unsure how to link another subform to hold data that pertains to the particular checklist tab.
I have created a very rough test database to demonstrate the technique.(ChecklistMultiAddImages_1a.accdb) download HERE:-
Multi Check List Plus Image Links
This download relates to a specific question on Access World Forums here:-https://www.access-programmers.co.uk/forums/threads/trouble-adapting-uncle-gizmos-checklist-code.312286/The code in this MS Access example database will be of little interest to any casual Observer. However if you've been...
gum.co
The Added Code:-
Code:
Dim strSELECT2 As String
Dim strFROM2 As String
Dim strWHERE2 As String
Dim strEND2 As String
strSELECT2 = "SELECT dataID, dataLinkID, dataSets, picName "
strFROM2 = "FROM tblData2 "
strWHERE2 = "WHERE (((dataSets)="
'& strSetID &'
strEND2 = "))"
Me.subFrmWinSfrmData2_05.Form.dataSets.DefaultValue = strSetID
Me.subFrmWinSfrmData2_05.Form.RecordSource = strSELECT2 & strFROM2 & strWHERE2 & 5 & strEND2
It's "hard coded" and only works on one set of sub-forms, and will need a lot of adjustment to get it working properly. You will need to follow my code design as a guide to pass the SQL Statements to ALL the sub forms.
I would very much like to complete this task, however I should be working a customer's database. The deadline is getting near, and I must devote my attention to that.
The other reason I'm reluctant to complete the code is you are running into a big problem if you carry on with the current design.
As you increase the number of subforms you are increasing the number of times MS Access has to extract information from the tables. This is going to slow your database down considerably, especially once you start adding a lot of data.
The solution is to only send the SQL Statement into the subforms when the tab the sub-form/sub-forms are on is selected.
I reckon this would be a good time to make this change. It really depends how much data you intend adding to it as to what you decide to do.
Last edited: