Art,
Maybe it's because you state "But that does not work" without providing any details about your actual results.
If the cmbChooseCabinet is on the main form then you would not have any reference to the subform. If I understand correctly your criteria would include only:
Sent: Thursday, March 15, 2018 8:14 AM
To: dbalorenzini@yahoo.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Using Query to fill in unbounded txtbox and labels captions
With Warm Regards,
I have a query called qryFieldDataList:
SELECT tblFieldNames.FieldNameID, tblFieldNames.CabinetID, tblFieldNames.FIeldName, tblData.DataID, tblData.Data
FROM tblFieldNames INNER JOIN tblData ON tblFieldNames.FieldNameID = tblData.FieldNameID;
I know there should be WHERE in here filtering on CabinetID
I an thinking it should be some like:
WHERE CabinetID = Forms!frmDocumentDashBoard!sfrmCabinetView!cmbChooseCabinet...value
But that does not work.
This query will support a subform called sfrmCabinetView which sits on the main from called frmDocumentDashboard. On frmDocumentDashboard is a combo box called cmbChooseCabinet. When the user selects a cabinet from the list it sets the CabinetID which I a trying to get to filter sfrmCabinetView which is a continuos form.
sfrmCabinetView Ex.
Form header section
lblField1 lblField2 lblField3 lblField4 lblField5……………………………..>lblField11
Details Section
txtField1 txtField2 txtxField3 txtField4 txtField5……………………………..>txtField11
The results of running query qryFieldDataList is as follows:
qryFieldDataList | ||||
FieldNameID | CabinetID | FIeldName | DataID | Data |
8 | 2 | Name | 1 | Abbey Aron |
9 | 2 | City | 2 | Dickinson |
10 | 2 | State | 3 | North Dakota |
11 | 2 | Zip | 4 | 58601 |
12 | 2 | District | 5 | |
13 | 2 | Position | 6 | Laborer |
14 | 2 | BIA Registration | 7 | |
15 | 2 | Tero Registration | 8 | 06-07-2011 |
16 | 2 | Education | 9 | HSD |
8 | 2 | Name | 10 | Adams John |
9 | 2 | City | 11 | Fort Yates |
10 | 2 | State | 12 | North Dakota |
11 | 2 | Zip | 13 | 58538 |
12 | 2 | District | 14 | Long Soldier |
13 | 2 | Position | 15 | Laborer |
14 | 2 | BIA Registration | 16 | |
15 | 2 | Tero Registration | 17 | |
16 | 2 | Education | 18 | HSD |
18 | 3 | Vendor Name | 19 | Bammers Seamless Gutters LLP |
19 | 3 | City | 20 | Flasher |
20 | 3 | State | 21 | North Dakota |
21 | 3 | Zip Code | 22 | 58535 |
22 | 3 | Type of Service | 23 | Other Direct Program Costs |
23 | 3 | PO Number | 24 | |
24 | 3 | Date | 25 | 05-23-2013 |
25 | 3 | Account Number | 26 | 0052-0052-50690-00 |
26 | 3 | Account Name | 27 | Other Direct Program Costs |
So the sfrmCabinetView Should look something like:
Form header section
Name City State Zip District……………………………..>lblField11
Details Section
Abbey Aron Dickinson North Dakota 58601 txtField5……………………………..>txtField11
Adams John Fort Yates North Dakota 58601 Long Soldier
Now if a Data field or Label.Caption is blank I would like to enter "N\A" or suppress it all together.
Thank you ,
This might look better is you copy and paste it to a Word Doc or something.
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar