Combo Box - Case Selection

B

Beeyen

Good Day,

The following code is listed in the Event Procedure of the WorkCategory. It
is meant to enable the fields ClaimsMonitor and SecondTester only if the
Rates, or Plans, or Co-Pay or Accumulations with the Combo Box is selected.
Otherwise the fields are disabled. The fields ClaimsMonitor and SecondTester
are enabled when the selection is made. The issue the field is it happens
with all the selection in the Combo Box. Could someone suggest what I am
doing wrong?

Thanks in advance

Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES", "PLANS", "CO-PAY", "ACCUMULATIONS"
Me.ClaimsMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimsMonitor.Enabled = True
Me.SecondTester.Enabled = True

End Select

End Sub
 
J

Jeanette Cunningham

Hi Beeyen,
on the form's property sheet, set the enabled value of claims monitor and
second tester to false.
Put code in the Current event for the form-->

Private Sub Form_Current()
Call WorkCategory_AfterUpdate()
End Sub

If the form is a single form view, you could put the code in the Load event
instead of the current event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

Beeyen

Good Day

The suggestions you made were good but it is not working. It may be that
the fields SecondTester and ClaimMonitor are Combo Boxes (please note below).
As you suggested, I set the data; enable property in SecondTester and
ClaimMonitor fields to no.

I included the coding as follows:

Private Sub Form_Current()
Call WorkCategory_AfterUpdate

End Sub
***********************************************************
Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES/DMR", "NEW PLAN", "CO-PAY/DAW", "ACCUMULATIONS"
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

End Select

End Sub
***********************************************************
Tab - Routing /Field - SecondTester
SELECT tblsectester.sectesterID, tblsectester.LastName & ", " & [FirstName]
AS Expr1, tblsectester.FirstName FROM tblsectester ORDER BY
tblsectester.LastName & ", " & [FirstName];

Tab – Routing/Field = ClaimMonitor
SELECT tblclaimmonitor.ClaimsMonitorID, tblclaimmonitor.LastName & ", " &
[FirstName] AS Expr1, tblclaimmonitor.FirstName FROM tblclaimmonitor ORDER BY
tblclaimmonitor.LastName & ", " & [FirstName];
 
J

Jeanette Cunningham

I haven't tested enabling and disabling combos, but I usually hide combo
boxes instead of disabling them.
I do this because the other alternative of locking a combo box, does not
stop it from dropping its list and then it looks like it is working, but
user can't select from it and I think this is confusing.



Beeyen said:
Good Day

The suggestions you made were good but it is not working. It may be that
the fields SecondTester and ClaimMonitor are Combo Boxes (please note
below).
As you suggested, I set the data; enable property in SecondTester and
ClaimMonitor fields to no.

I included the coding as follows:

Private Sub Form_Current()
Call WorkCategory_AfterUpdate

End Sub
***********************************************************
Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES/DMR", "NEW PLAN", "CO-PAY/DAW", "ACCUMULATIONS"
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

End Select

End Sub
***********************************************************
Tab - Routing /Field - SecondTester
SELECT tblsectester.sectesterID, tblsectester.LastName & ", " &
[FirstName]
AS Expr1, tblsectester.FirstName FROM tblsectester ORDER BY
tblsectester.LastName & ", " & [FirstName];

Tab - Routing/Field = ClaimMonitor
SELECT tblclaimmonitor.ClaimsMonitorID, tblclaimmonitor.LastName & ", " &
[FirstName] AS Expr1, tblclaimmonitor.FirstName FROM tblclaimmonitor ORDER
BY
tblclaimmonitor.LastName & ", " & [FirstName];


Jeanette Cunningham said:
Hi Beeyen,
on the form's property sheet, set the enabled value of claims monitor and
second tester to false.
Put code in the Current event for the form-->

Private Sub Form_Current()
Call WorkCategory_AfterUpdate()
End Sub

If the form is a single form view, you could put the code in the Load
event
instead of the current event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

Beeyen

Good Day Ms Jeannette,

Thanks for responding and trying to assist. We can not be expected to know
everything. Should I re-post the question or do I just create another
posting?

Also, perhaps you can assist me a different question; I am trying to apply
the same dates in a subform, to two different fields and two different tabs
with the a radio button that has the coding noted below.

Tab = Production; Field = ProductionCompleted
Tab = Quality Assurance; Field = RecievedfromProduction

Private Sub ProductionCompletedButton_AfterUpdate()
If Me.ProductionCompletedButton.Value = True Then
Me.ProductionCompleted = Now()

Else
Me.[ProductionCompleted] = Null

End If
End Sub


Jeanette Cunningham said:
I haven't tested enabling and disabling combos, but I usually hide combo
boxes instead of disabling them.
I do this because the other alternative of locking a combo box, does not
stop it from dropping its list and then it looks like it is working, but
user can't select from it and I think this is confusing.



Beeyen said:
Good Day

The suggestions you made were good but it is not working. It may be that
the fields SecondTester and ClaimMonitor are Combo Boxes (please note
below).
As you suggested, I set the data; enable property in SecondTester and
ClaimMonitor fields to no.

I included the coding as follows:

Private Sub Form_Current()
Call WorkCategory_AfterUpdate

End Sub
***********************************************************
Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES/DMR", "NEW PLAN", "CO-PAY/DAW", "ACCUMULATIONS"
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

End Select

End Sub
***********************************************************
Tab - Routing /Field - SecondTester
SELECT tblsectester.sectesterID, tblsectester.LastName & ", " &
[FirstName]
AS Expr1, tblsectester.FirstName FROM tblsectester ORDER BY
tblsectester.LastName & ", " & [FirstName];

Tab - Routing/Field = ClaimMonitor
SELECT tblclaimmonitor.ClaimsMonitorID, tblclaimmonitor.LastName & ", " &
[FirstName] AS Expr1, tblclaimmonitor.FirstName FROM tblclaimmonitor ORDER
BY
tblclaimmonitor.LastName & ", " & [FirstName];


Jeanette Cunningham said:
Hi Beeyen,
on the form's property sheet, set the enabled value of claims monitor and
second tester to false.
Put code in the Current event for the form-->

Private Sub Form_Current()
Call WorkCategory_AfterUpdate()
End Sub

If the form is a single form view, you could put the code in the Load
event
instead of the current event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Good Day,

The following code is listed in the Event Procedure of the
WorkCategory.
It
is meant to enable the fields ClaimsMonitor and SecondTester only if
the
Rates, or Plans, or Co-Pay or Accumulations with the Combo Box is
selected.
Otherwise the fields are disabled. The fields ClaimsMonitor and
SecondTester
are enabled when the selection is made. The issue the field is it
happens
with all the selection in the Combo Box. Could someone suggest what I
am
doing wrong?

Thanks in advance

Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES", "PLANS", "CO-PAY", "ACCUMULATIONS"
Me.ClaimsMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimsMonitor.Enabled = True
Me.SecondTester.Enabled = True

End Select

End Sub
 
B

Beeyen

Good Day,

No worries on the fields, I figured it out! But if you here anything
relative to the disenabling/enabling dilemma, let me know.

Thanks

Beeyen said:
Good Day Ms Jeannette,

Thanks for responding and trying to assist. We can not be expected to know
everything. Should I re-post the question or do I just create another
posting?

Also, perhaps you can assist me a different question; I am trying to apply
the same dates in a subform, to two different fields and two different tabs
with the a radio button that has the coding noted below.

Tab = Production; Field = ProductionCompleted
Tab = Quality Assurance; Field = RecievedfromProduction

Private Sub ProductionCompletedButton_AfterUpdate()
If Me.ProductionCompletedButton.Value = True Then
Me.ProductionCompleted = Now()

Else
Me.[ProductionCompleted] = Null

End If
End Sub


Jeanette Cunningham said:
I haven't tested enabling and disabling combos, but I usually hide combo
boxes instead of disabling them.
I do this because the other alternative of locking a combo box, does not
stop it from dropping its list and then it looks like it is working, but
user can't select from it and I think this is confusing.



Beeyen said:
Good Day

The suggestions you made were good but it is not working. It may be that
the fields SecondTester and ClaimMonitor are Combo Boxes (please note
below).
As you suggested, I set the data; enable property in SecondTester and
ClaimMonitor fields to no.

I included the coding as follows:

Private Sub Form_Current()
Call WorkCategory_AfterUpdate

End Sub
***********************************************************
Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES/DMR", "NEW PLAN", "CO-PAY/DAW", "ACCUMULATIONS"
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

End Select

End Sub
***********************************************************
Tab - Routing /Field - SecondTester
SELECT tblsectester.sectesterID, tblsectester.LastName & ", " &
[FirstName]
AS Expr1, tblsectester.FirstName FROM tblsectester ORDER BY
tblsectester.LastName & ", " & [FirstName];

Tab - Routing/Field = ClaimMonitor
SELECT tblclaimmonitor.ClaimsMonitorID, tblclaimmonitor.LastName & ", " &
[FirstName] AS Expr1, tblclaimmonitor.FirstName FROM tblclaimmonitor ORDER
BY
tblclaimmonitor.LastName & ", " & [FirstName];


:

Hi Beeyen,
on the form's property sheet, set the enabled value of claims monitor and
second tester to false.
Put code in the Current event for the form-->

Private Sub Form_Current()
Call WorkCategory_AfterUpdate()
End Sub

If the form is a single form view, you could put the code in the Load
event
instead of the current event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Good Day,

The following code is listed in the Event Procedure of the
WorkCategory.
It
is meant to enable the fields ClaimsMonitor and SecondTester only if
the
Rates, or Plans, or Co-Pay or Accumulations with the Combo Box is
selected.
Otherwise the fields are disabled. The fields ClaimsMonitor and
SecondTester
are enabled when the selection is made. The issue the field is it
happens
with all the selection in the Combo Box. Could someone suggest what I
am
doing wrong?

Thanks in advance

Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES", "PLANS", "CO-PAY", "ACCUMULATIONS"
Me.ClaimsMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimsMonitor.Enabled = True
Me.SecondTester.Enabled = True

End Select

End Sub
 
J

Jeanette Cunningham

Did you try hiding the combos instead of disabling them?
In the property sheet for each combo, you would change their enabled
property to Yes, and their Visible property to No.
If you are still having problems with this, there must be something about
the setup of the form, such as subforms, tabs that have not yet been
mentioned or other code or some other property for the form that is
interferring with this.
It is the sort of thing that developers do often.

Re your second question:
Would you post the name of the frame with the radio buttons

Re If Me.ProductionCompletedButton.Value = True Then
What type of control is ProductionCompletedButton?
Where is the ProductionCompletedButton? - on the main form, the subform?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Beeyen said:
Good Day Ms Jeannette,

Thanks for responding and trying to assist. We can not be expected to
know
everything. Should I re-post the question or do I just create another
posting?

Also, perhaps you can assist me a different question; I am trying to apply
the same dates in a subform, to two different fields and two different
tabs
with the a radio button that has the coding noted below.

Tab = Production; Field = ProductionCompleted
Tab = Quality Assurance; Field = RecievedfromProduction

Private Sub ProductionCompletedButton_AfterUpdate()
If Me.ProductionCompletedButton.Value = True Then
Me.ProductionCompleted = Now()

Else
Me.[ProductionCompleted] = Null

End If
End Sub


Jeanette Cunningham said:
I haven't tested enabling and disabling combos, but I usually hide combo
boxes instead of disabling them.
I do this because the other alternative of locking a combo box, does not
stop it from dropping its list and then it looks like it is working, but
user can't select from it and I think this is confusing.



Beeyen said:
Good Day

The suggestions you made were good but it is not working. It may be
that
the fields SecondTester and ClaimMonitor are Combo Boxes (please note
below).
As you suggested, I set the data; enable property in SecondTester and
ClaimMonitor fields to no.

I included the coding as follows:

Private Sub Form_Current()
Call WorkCategory_AfterUpdate

End Sub
***********************************************************
Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES/DMR", "NEW PLAN", "CO-PAY/DAW", "ACCUMULATIONS"
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimMonitor.Enabled = False
Me.SecondTester.Enabled = False

End Select

End Sub
***********************************************************
Tab - Routing /Field - SecondTester
SELECT tblsectester.sectesterID, tblsectester.LastName & ", " &
[FirstName]
AS Expr1, tblsectester.FirstName FROM tblsectester ORDER BY
tblsectester.LastName & ", " & [FirstName];

Tab - Routing/Field = ClaimMonitor
SELECT tblclaimmonitor.ClaimsMonitorID, tblclaimmonitor.LastName & ", "
&
[FirstName] AS Expr1, tblclaimmonitor.FirstName FROM tblclaimmonitor
ORDER
BY
tblclaimmonitor.LastName & ", " & [FirstName];


:

Hi Beeyen,
on the form's property sheet, set the enabled value of claims monitor
and
second tester to false.
Put code in the Current event for the form-->

Private Sub Form_Current()
Call WorkCategory_AfterUpdate()
End Sub

If the form is a single form view, you could put the code in the Load
event
instead of the current event.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Good Day,

The following code is listed in the Event Procedure of the
WorkCategory.
It
is meant to enable the fields ClaimsMonitor and SecondTester only if
the
Rates, or Plans, or Co-Pay or Accumulations with the Combo Box is
selected.
Otherwise the fields are disabled. The fields ClaimsMonitor and
SecondTester
are enabled when the selection is made. The issue the field is it
happens
with all the selection in the Combo Box. Could someone suggest what
I
am
doing wrong?

Thanks in advance

Private Sub WorkCategory_AfterUpdate()
Select Case Me.WorkCategory.Column(2)
Case "RATES", "PLANS", "CO-PAY", "ACCUMULATIONS"
Me.ClaimsMonitor.Enabled = False
Me.SecondTester.Enabled = False

Case Else
Me.ClaimsMonitor.Enabled = True
Me.SecondTester.Enabled = True

End Select

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top