Solved How do I add a calculated management field and how do I add the name instead of the number (1 Viewer)

Sarah.M

Member
Local time
Today, 22:58
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is disabled at work for security reason
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
1. How do I add a calculated management field (I mean Field that is not part of the table just to be shown in table)
2. how do I add the name instead of the number

Sample database has been attached
plz help!

1635466397045.png
 

Attachments

  • ‏‏SaveFilter7.zip
    96.6 KB · Views: 355

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:58
Joined
May 7, 2009
Messages
19,169
you create a Query (see qryUserSection) and use the query as recordsource of your subform.
actually there is "No Evil" in them if you know how to tame them.
 

Attachments

  • __SaveFilter7.zip
    110.5 KB · Views: 359

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:58
Joined
May 21, 2018
Messages
8,463

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:58
Joined
May 7, 2009
Messages
19,169
here is the fix:
combo.png
 

Attachments

  • __SaveFilter7.zip
    109.8 KB · Views: 354

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:58
Joined
May 21, 2018
Messages
8,463
That is the same as what I suggested.
Join2.jpg
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:58
Joined
May 7, 2009
Messages
19,169
there is an alternative dlookup()?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:58
Joined
May 7, 2009
Messages
19,169
as per your request, this is the SQL of your Section combobox's rowsource:

select sectionT.id, sectionT.section, DLookup("Management", "managementT","ID = " & sectionT.[management]) As Mgmt from sectionT;


this is only alternative and nobody will suggests this.
the rowsource of Section has already a Joined tables.
see the attached file above.
 

Sarah.M

Member
Local time
Today, 22:58
Joined
Oct 28, 2021
Messages
335
as per your request, this is the SQL of your Section combobox's rowsource:

select sectionT.id, sectionT.section, DLookup("Management", "managementT","ID = " & sectionT.[management]) As Mgmt from sectionT;


this is only alternative and nobody will suggests this.
the rowsource of Section has already a Joined tables.
see the attached file above.
Thanks!
I will try it soon once I get back at home
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:58
Joined
May 21, 2018
Messages
8,463

Sarah.M

Member
Local time
Today, 22:58
Joined
Oct 28, 2021
Messages
335
as per your request, this is the SQL of your Section combobox's rowsource:

select sectionT.id, sectionT.section, DLookup("Management", "managementT","ID = " & sectionT.[management]) As Mgmt from sectionT;


this is only alternative and nobody will suggests this.
the rowsource of Section has already a Joined tables.
see the attached file above.
Thanks I like it, can we put it in Query to make as Filed? plz see the picture
1635507327316.png
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:58
Joined
May 7, 2009
Messages
19,169
did you see qryUserSection on the db i uploaded.
view it in design view.
then make it the Recordsource of your subform.

that one is much simpler than:

Management: DLookUp("management","managementT","id= " & DLookUp("management","sectionT","id=" & [section]))
 

Sarah.M

Member
Local time
Today, 22:58
Joined
Oct 28, 2021
Messages
335
did you see qryUserSection on the db i uploaded.
view it in design view.
then make it the Recordsource of your subform.

that one is much simpler than:

Management: DLookUp("management","managementT","id= " & DLookUp("management","sectionT","id=" & [section]))
Ohhh, yes Thanks!!!
This is what I am looking for!!!
 

Users who are viewing this thread

Top Bottom