RE: one value in a combo
- From: Dan @BCBS <DanBCBS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 12 May 2006 07:28:01 -0700
Sure, to what email address, I cannot attach anything to this message...
I'm sure you don't want the entire database, but I can send you whats in the
table, form and form code...
Thanks for the help, if this can be done, it would solve a lot of issues we
are having..
"Barry Gilbert" wrote:
Unfortunately, I don't think I can help anymore without seeing it firsthand..
Would you be able to send me a copy?
"Dan @BCBS" wrote:
No difference, still an empty combo box.
I tried WHERE [DEC_CODE] <> 'WI'
and
I tried WHERE [DEC_CODE] = 'WI'
Both ways empty for manager and non-manager...
I also removed "cmdDelete.Enabled = False" which disables a command button
if not a manager.
Everything we have tried just removes all the choices from the combo box.????
"Barry Gilbert" wrote:
This:
WHERE [DEC_CODE <> 'WI']
should be this:
WHERE [DEC_CODE] <> 'WI'
Barry
"Dan @BCBS" wrote:
Either way (<> 'WI' or ='WI') they both just eliminate all the choices and I
get a combo box that is empty..
"Barry Gilbert" wrote:
In that case, I think your logic is wrong. Shouldn't it be:
Private Sub Form_Load()
If glevel <> "MANAGER" Then
cmdDelete.Enabled = False
Me.TR_DECISION.RowSource = "SELECT DEC_CODE From tblDecisionCodes"
Else
Me.TR_DECISION.RowSource = "SELECT DEC_CODE From tblDecisionCodes
WHERE [DEC_CODE <> 'WI']"
End If
End Sub
If it's a manager, you want them to see everything. If it's not a manager,
you want them to see everything except WI.
"Dan @BCBS" wrote:
No that's not what I want...
I need "If manager then enable WI" (withdrawn) only managers can withdraw
the case...
"WI" is one of the choices in the combo box, not the entire box...
Private Sub Form_Load()
If glevel <> "MANAGER" Then
cmdDelete.Enabled = False
Me.TR_DECISION.RowSource = "SELECT DEC_CODE From tblDecisionCodes"
Else
Me.TR_DECISION.RowSource = "SELECT DEC_CODE From tblDecisionCodes
WHERE [DEC_CODE = 'WI']"
End If
End Sub
////////////
Is this possible??
"Barry Gilbert" wrote:
If you have records with WI, then the problem is in the rowsource statement.
Have you tried the square brackets?
If there are zero records with 'WI', you'll get no records for your combo.
Isn't this what you wanted?
Barry
"Dan @BCBS" wrote:
There are 2050 records with DEC_CODE of 'WI'...
But even if there were zero the code still removes all the values from the
drop down..??
"Barry Gilbert" wrote:
Dan,
The real question is, how many records have a DEC_CODE of 'WI'? Test this by
pasting the second select statement into the sql design view of a query and
seeing the results. You might also need to enclose DEC_CODE in square
brackets to get it to work.
Barry
"Dan @BCBS" wrote:
Maybe disabled was not the best term to use - all the values are missing when
I use the code below. The combo box opens but there are no choices...
Yes the records seem fine, there are 63102 records all have a DEC_CODE from
the combo box. But again, this code just removes the choices from the box.
Help
"Barry Gilbert" wrote:
Dan,
I'm not sure why the combobox would be disabled. All you're doing is
changing the rowsource. Have you looked at the records that each sql
statement returns? Do they seem correct? When you say the combobox is
disabled, do you mean its Enabled property is set to false (grayed out)?
Barry
"Dan @BCBS" wrote:
Is this even possible....?
I've received some help on this (title Disable drop down) but I'm still
struggling.
I need to make one specific item in a combo box enabled only for certain
people.
Is it possible to specify one value from a combo box..
This code disables the entire combo box no matter what the glevel.
Private Sub Form_Load()
If glevel <> "MANAGER" Then
cmdDelete.Enabled = False
Me.TR_DECISION.RowSource = "SELECT DEC_CODE From tblDecisionCodes"
Else
Me.TR_DECISION.RowSource = "SELECT DEC_CODE From tblDecisionCodes
WHERE (DEC_CODE = 'WI')"
End If
End Sub
- Follow-Ups:
- RE: one value in a combo
- From: Barry Gilbert
- RE: one value in a combo
- References:
- RE: one value in a combo
- From: Barry Gilbert
- RE: one value in a combo
- From: Dan @BCBS
- RE: one value in a combo
- From: Barry Gilbert
- RE: one value in a combo
- From: Dan @BCBS
- RE: one value in a combo
- From: Barry Gilbert
- RE: one value in a combo
- From: Dan @BCBS
- RE: one value in a combo
- From: Barry Gilbert
- RE: one value in a combo
- Prev by Date: Me.Undo and validation of fields
- Next by Date: RE: one value in a combo
- Previous by thread: RE: one value in a combo
- Next by thread: RE: one value in a combo
- Index(es):
Relevant Pages
|