Kamis, 15 Maret 2018

Re: [MS_AccessPros] Using Query to fill in unbounded txtbox and labels captions

 

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:


   Forms!frmDocumentDashBoard!cmbChooseCabinet

You mention "I would like to enter ..." but this seems to be a filtering of a query with no "enter" other than the combo box. If you want to display N\A or N/A in place of Null you could use: Nz([Your Field],"N/A")

Regards,
Duane


From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
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
 


Too much information or not enough? I just need to be pointed in the right direction...


With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Valar Dohaeris"






On ‎Tuesday‎, ‎March‎ ‎13‎, ‎2018‎ ‎02‎:‎05‎:‎35‎ ‎PM‎ ‎CDT, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

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 ,


Art Lorenzini 
Sioux Falls, SD


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)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar