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

How can I change a form field's visible setting at a RECORD-level only

P: 3
Hello , I am using MS Access 2003. I have two Tables called 'Members' and 'CRM Database', which are related via the same memberhsip number. Basically, the CRM Database records all marketing calls made to members.

I have created a form for Members, with a sub-form for the CRM Database. With the CRM Database Sub-form, it displays all of the calls made to the member. I have tried to implement some VB code so that when a user chooses a specific drop-down option (Renewal) from a field (Reason) for a call (an individal record), that another field (Renewal Outcome) is displayed (and vice versa).

Here is the code I have setup:

If Me.Reason = "Renewal" Then
Me.Renewal_Outcome.Visible = True
Else
Me.Renewal_Outcome.Visible = False
End If

My problem is that when a user chooses a different drop-down option (one that isn't Renewal) from the 'Reason' field, the 'Renewal Outcome' field is hidden on all of the calls (even if previous calls have been a 'Renewal' call and they have a 'Renewal Outcome' field entry). The same is also true in reverse.

What I want to know is what code I can use so that the form field visibility only changes on a record-level (i.e. for that call only). At the moment, it is changing the field visibility on not only all calls for that member, but for everyone's calls on the whole database. This is bad because it makes it confusing for the people trying to enter data and it also means they cannot see data already entered into the fields for old calls, which have been hidden based on what was selected in their latest call.

If someone could please help me that would be fabulous!!!

Thanks
Apr 21 '10 #1
Share this Question
Share on Google+
2 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
@gothebroncos
If you subform is Continues, then thats simply how they work, you can't make record lvl adjustment on continues forms.

IF its not continues, then its a matter of placing the code in the right places. Where is your code currently placed?
Is the dropdown field (reason) placed in the main form or subform?
Apr 21 '10 #2

P: 3
it turns out i could use conditional formatting on my form to solve this one (disable/enable field)! Thanks though!
Jul 28 '10 #3

Post your reply

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