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

Subform OnCurrent not changing .Visible

RobH
P: 56
I have a Form - With a combo Box "Type" This selects a category eg TK, RR, PM etc

In the subform it shows the records with field [PT] = Type
On the subform I want to limit what Fields are visible dependant on the Type Selected.

To this end i have set the OnCurrent to

Expand|Select|Wrap|Line Numbers
  1. If Parent![Type] = "TK" then
  2.  ME.PL.Visible = False
  3. Else if Parent![Type] = RR then
  4.  ME.PL.Visible = True
  5. .
  6. .
  7. Endif
  8.  
  9.  
However when the type is changed the visible does not change - even though the Category listed does change to match the type selected.

Thoughts??
Sep 15 '07 #1
Share this Question
Share on Google+
2 Replies


Scott Price
Expert 100+
P: 1,384
I have a Form - With a combo Box "Type" This selects a category eg TK, RR, PM etc

In the subform it shows the records with field [PT] = Type
On the subform I want to limit what Fields are visible dependant on the Type Selected.

To this end i have set the OnCurrent to

Expand|Select|Wrap|Line Numbers
  1. If Parent![Type] = "TK" then
  2.  ME.PL.Visible = False
  3. Else if Parent![Type] = RR then
  4.  ME.PL.Visible = True
  5. .
  6. .
  7. Endif
  8.  
  9.  
However when the type is changed the visible does not change - even though the Category listed does change to match the type selected.

Thoughts??
Hi Rob,

I see you made an edit/comment that you had solved this yourself. Likely the solution involved putting this into the AfterUpdate event of your [Type] field?

Regards,
Scott
Sep 15 '07 #2

JConsulting
Expert 100+
P: 603
I have a Form - With a combo Box "Type" This selects a category eg TK, RR, PM etc

In the subform it shows the records with field [PT] = Type
On the subform I want to limit what Fields are visible dependant on the Type Selected.

To this end i have set the OnCurrent to

Expand|Select|Wrap|Line Numbers
  1. If Parent![Type] = "TK" then
  2.  ME.PL.Visible = False
  3. Else if Parent![Type] = RR then
  4.  ME.PL.Visible = True
  5. .
  6. .
  7. Endif
  8.  
  9.  
However when the type is changed the visible does not change - even though the Category listed does change to match the type selected.

Thoughts??
When you try to set properties that change the visible aspect of your forms, you usually have to refresh your form/subform in order to see the changes. Values act differently as they update with the event. Just a thought.
J
Sep 15 '07 #3

Post your reply

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