Solved Expression builder Form Object Frame (1 Viewer)

Sarah.M

Member
Local time
Today, 23:42
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason (Cybersecurity).
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
------------------------------------------------
How can I tell that this is a Report or a Form through the expression builder?, Because I want to use If function iif this Report do this Else Do that etc..
This is [SelectionType] just example, becuse I did not find it in expression builder Form Object Frame

plz help me to find a way to solve it , or if you have alternative way to determine this a form or a report please let us know 🙏
1651205131957.png
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:42
Joined
May 7, 2009
Messages
19,169
Object Frame value is Numeric.
the first Item is 1, the second is 2 and so on.
supposed that what you put on the first item is a form:

you can use Choose() function to test your [Selection Type].
Choose will test if it is 1, 2, 3, etc:

supposed the first option is a form, then the second is a report:

Choose([Selection Type], "this is a form", "this is a report")
 

Sarah.M

Member
Local time
Today, 23:42
Joined
Oct 28, 2021
Messages
335
Object Frame value is Numeric.
the first Item is 1, the second is 2 and so on.
supposed that what you put on the first item is a form:

you can use Choose() function to test your [Selection Type].
Choose will test if it is 1, 2, 3, etc:

supposed the first option is a form, then the second is a report:

Choose([Selection Type], "this is a form", "this is a report")
I tried, I got error plz help 🙏
sample attached
1651209614971.png
1651209999127.png
 

Attachments

  • 1651209572112.png
    1651209572112.png
    11.5 KB · Views: 162
  • FormOrReport.accdb
    704 KB · Views: 174

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:42
Joined
May 7, 2009
Messages
19,169
i can't find where is [SelectionType] on your form, table, or query?
 

Sarah.M

Member
Local time
Today, 23:42
Joined
Oct 28, 2021
Messages
335
i can't find where is [SelectionType] on your form, table, or query?
Thanks for replying
[SelectionType] I could not find it in Expression Builder, that is why I ask to find out the way to get it
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:42
Joined
Feb 19, 2002
Messages
42,976
I guess I don't understand why you don't know what type of object you opened. Can you explain the business problem please.
 

Sarah.M

Member
Local time
Today, 23:42
Joined
Oct 28, 2021
Messages
335
I guess I don't understand why you don't know what type of object you opened. Can you explain the business problem please.
Thanks for replying
If I can distinguish between a form and a report it will help me a lot in customizing some macro commands
plz see the attached picture
Sample attached
plz help 🙏

1651245892819.png

1651245645133.png
 

Attachments

  • FormOrReport.accdb
    704 KB · Views: 178

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:42
Joined
Feb 19, 2002
Messages
42,976
I don't use macros. Can you just leave the type empty and have it close whatever object is active? or specify "active object"
 

Users who are viewing this thread

Top Bottom