UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Conditional In Macros, Access 2013    
 
   
ema
post Feb 8 2019, 11:02 AM
Post#1



Posts: 4
Joined: 29-January 19



I need to implement
CODE
If Label1.Visible = False Then
into macro language as opposed to VBA language, but I don't know how.
This post has been edited by ema: Feb 8 2019, 11:02 AM
Go to the top of the page
 
DanielPineault
post Feb 8 2019, 11:34 AM
Post#2


UtterAccess VIP
Posts: 6,395
Joined: 30-June 11



Can you not do something along the lines of
CODE
If Forms![YourFormName].[Form]![Label1].[Visible]=False Then

or
CODE
Id [Label1].[Visible]=False Then

both work for me.


Why not VBA, you'd be much better served using VBA.

--------------------
Daniel Pineault (2010-2018 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
ema
post Feb 8 2019, 11:37 AM
Post#3



Posts: 4
Joined: 29-January 19



I've been asked to implement it in macro language. Just as well, one benefit I see is avoiding trust challenges.

Your code works for me too. Am now using the second line you provided. Thank you.
This post has been edited by ema: Feb 8 2019, 11:45 AM
Go to the top of the page
 
DanielPineault
post Feb 8 2019, 12:43 PM
Post#4


UtterAccess VIP
Posts: 6,395
Joined: 30-June 11



You still need to set up trusted locations or enable the content to macro and/or VBA to run. So there is 0 difference on that aspect.

Macros are much more of a PITA to work with, no way to search through them should you need to perform an update... Whomever ask for macros specifically needs to rethink this. There was a time, when web databases/apps existed, that they had there place, but now, you should avoid them like the plague.

Anyways, at least it is functional, at the end of the day, that is the most important thing.



--------------------
Daniel Pineault (2010-2018 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
theDBguy
post Feb 8 2019, 02:09 PM
Post#5


Access Wiki and Forums Moderator
Posts: 74,450
Joined: 19-June 07
From: SunnySandyEggo


Hi ema. Just as an FYI, macros only work in a non-trusted document or location if the macro action being executed is considered as "safe." For example, the MessageBox macro action. Otherwise, any "unsafe" macro actions will still not work if the database is not trusted. For example, the DeleteObject macro action.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
GroverParkGeorge
post Feb 8 2019, 07:45 PM
Post#6


UA Admin
Posts: 34,536
Joined: 20-June 02
From: Newcastle, WA


Attached File  unsafemacroactions.jpg ( 94.77K )Number of downloads: 0

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    16th February 2019 - 01:34 PM