I have a macro with several actions in it. They each have a condition. The macro seems to be working for the first line of action, but not for any of the subsequent actions. Any ideas why this may be and/or how to work around it?
Thanks.
4 2572 ADezii 8,834
Recognized Expert Expert
I have a macro with several actions in it. They each have a condition. The macro seems to be working for the first line of action, but not for any of the subsequent actions. Any ideas why this may be and/or how to work around it?
Thanks.
Posting the contents of you Macro would be most helpful.
I do all of this via the macro interface because I don't know VBA.
I have the following fields, which have the Visible property set to No on the form, but the macro runs OnOpen of the form. If the employee has checked the Yes/No box to Yes, the fields become visible.
Address
City
State
Zip
Address Visible (Yes/No)
HomePhone (Yes/No)
Fax (Yes/No)
Birthdate (Yes/No)
Personal Email
PersonalEmailVi sible (Yes/No)
Macro:
Condition: [Forms]![DirectoryDetail sForm]![AddressVisible]=Yes, SetValue of Address.Visible to Yes
[Forms]![DirectoryDetail sForm]![ddressVisible]=Yes, SetValue of City.Visible to Yes
Same for State and then zip
[Forms]![DirectoryDetail sForm]![HomePhoneVisibl e]=Yes, SetValue of HomePhone.Visib le to Yes
Same idea for the rest of the fields. The purpose is to allow the employee power over which personal items they want to allow other employees to view.
ADezii 8,834
Recognized Expert Expert
I do all of this via the macro interface because I don't know VBA.
I have the following fields, which have the Visible property set to No on the form, but the macro runs OnOpen of the form. If the employee has checked the Yes/No box to Yes, the fields become visible.
Address
City
State
Zip
Address Visible (Yes/No)
HomePhone (Yes/No)
Fax (Yes/No)
Birthdate (Yes/No)
Personal Email
PersonalEmailVi sible (Yes/No)
Macro:
Condition: [Forms]![DirectoryDetail sForm]![AddressVisible]=Yes, SetValue of Address.Visible to Yes
[Forms]![DirectoryDetail sForm]![ddressVisible]=Yes, SetValue of City.Visible to Yes
Same for State and then zip
[Forms]![DirectoryDetail sForm]![HomePhoneVisibl e]=Yes, SetValue of HomePhone.Visib le to Yes
Same idea for the rest of the fields. The purpose is to allow the employee power over which personal items they want to allow other employees to view.
Is [Forms]![DirectoryDetail sForm]![ddressVisible]=Yes a typographical Error? Shouldn't it be [Forms]![DirectoryDetail sForm]![AddressVisible]=Yes?
BTW, a helpful hint: To repeat the same Macro Condition as in the previous line, place 3 periods (...) in the Condition Column.
Is [Forms]![DirectoryDetail sForm]![ddressVisible]=Yes a typographical Error? Shouldn't it be [Forms]![DirectoryDetail sForm]![AddressVisible]=Yes?
BTW, a helpful hint: To repeat the same Macro Condition as in the previous line, place 3 periods (...) in the Condition Column.
It is an error, but not in the macro, just in the message.
Thanks for that tip!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Andrew |
last post by:
I use conditional compiler constants, set through the VBA IDE in
Tools, <projectname> Properties, that I refer to throughout my code to
control which code is used during development, and which during
production. Usually, this only wraps code used to control quitting
the whole app versus just shutting a form, but it can also control
many other things.
However, as part of the build before delivering an update, I have to
remember to...
|
by: E Harris |
last post by:
Hello all.
I want to schedule an Access macro to run. The macro runs 3
make-table queries.
The best way I thought to accomplish this is to create a shortcut, and
then use the task scheduler to run that shortcut.
I am working within a secure workgroup. Here is what my shortcut
contains:
|
by: Dexsquab Molutinator via AccessMonster.com |
last post by:
Greetings.
I have searched for an answer to my query for some time and have had no success. I'm hoping the pooled resources of all your brains can help.
How do you set a field to become active only if a certain condition is met?
I have several forms which are to be used for client booking and administration. Each has several fields which use a lookup across another table to ensure only valid values can be selected in those fields. I...
|
by: ammarton |
last post by:
Hello all...I'm a bit new to working with Macros in Access so forgive
me if the terminology I use is not accurate.
To preface this, basically I am using a form on a replicated database
so the end-user can filter on a specific report they want to see. This
database was designed by my predecessor (of which he left no
documentation) and I need to add some additional functions to this
end-user filter report.
Within one Macro, he has over...
|
by: Keith Austin |
last post by:
I need to produce a macro for a project that I have to do in my course in IT
"Certificate III IT (Software Applications) Unit ICAITUO18C". The macro
needs to validate previously imported data from Text Files. I have already
written the macro to import the data and now this Validate Macro forms part
of that Macro. The case scenario relates to a Music Expo and 3 bands appear
in this exercise. Obviously the previous macro wont complete until...
| |
by: Nick M |
last post by:
Hello All,
Excellent info here Thanks!
I am very new to using access in general and I am on a learning curve.
I'm trying to import an excel workbook (with worksheets) into an access db
via a macro. (I'll get to using VB later on).
What I would like to do is import a single workbook w/three seperate
worksheets into three seperate access tables AND truncate the time stamp
that is used in the excell sheet via a macro.
|
by: richardlang |
last post by:
Anyone out there ever come across a preprocessor macro that compares an
argument value against the predefined __DATE__ macro in order to
control conditional compilation based on date.
Something along the lines of...
# define DateLaterThan(x) ...
that could be used for things like
|
by: Takeadoe |
last post by:
Dear NG,
Can someone assist me with writing the little code that is needed to
run an update table query each time the database is opened? From what
I've been able to glean from this group, the Autoexec Macro looks like
the way to go. Could someone please assist?
Thank you very much!
Mike
|
by: anon.asdf |
last post by:
Hello!
Can the proprocessor make conditional decisions. Here's an example of
the functionality (not standard C!)
#define PUT_BYTE(const_index, val) \
#preprocessor_if (const_index == 0) \
({ *(77) = (val); }) \
#preprocessor_else_if (const_index == 1) \
({ *(99) = (val); }) \
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |