By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,662 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,662 IT Pros & Developers. It's quick & easy.

Conditional macro is stopping after first action

P: 58
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.
Feb 23 '07 #1
Share this Question
Share on Google+
4 Replies


ADezii
Expert 5K+
P: 8,607
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.
Feb 24 '07 #2

P: 58
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
PersonalEmailVisible (Yes/No)

Macro:
Condition: [Forms]![DirectoryDetailsForm]![AddressVisible]=Yes, SetValue of Address.Visible to Yes
[Forms]![DirectoryDetailsForm]![ddressVisible]=Yes, SetValue of City.Visible to Yes

Same for State and then zip

[Forms]![DirectoryDetailsForm]![HomePhoneVisible]=Yes, SetValue of HomePhone.Visible 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.
Feb 24 '07 #3

ADezii
Expert 5K+
P: 8,607
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
PersonalEmailVisible (Yes/No)

Macro:
Condition: [Forms]![DirectoryDetailsForm]![AddressVisible]=Yes, SetValue of Address.Visible to Yes
[Forms]![DirectoryDetailsForm]![ddressVisible]=Yes, SetValue of City.Visible to Yes

Same for State and then zip

[Forms]![DirectoryDetailsForm]![HomePhoneVisible]=Yes, SetValue of HomePhone.Visible 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]![DirectoryDetailsForm]![ddressVisible]=Yes a typographical Error? Shouldn't it be [Forms]![DirectoryDetailsForm]![AddressVisible]=Yes?

BTW, a helpful hint: To repeat the same Macro Condition as in the previous line, place 3 periods (...) in the Condition Column.
Feb 25 '07 #4

P: 58
Is [Forms]![DirectoryDetailsForm]![ddressVisible]=Yes a typographical Error? Shouldn't it be [Forms]![DirectoryDetailsForm]![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!
Feb 25 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.