Re: prevent the user to open the list of the combo-box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 11/06/04


Date: Sun, 07 Nov 2004 07:25:27 +1300

Liat,

Would it suit your purpose to use code to toggle the Enabled and Locked
properties of the combobox, depending on the value of the main form
control, so the combobox is simply inaccessible in the circumstances you
prescribe?

-- 
Steve Schapel, Microsoft Access MVP
Liat wrote:
> Hello,
> 
> I have a combo box in a sub form.
> I would like to restrict the use in a way that in some cases, depends on a 
> value of a field in the main form, the list of the combp box will not open.
> 
> Currently, on the event mouseDown, I open another form with an alert that it 
> is not possible to change the value. The problem is that the window with the 
> list of the combo-box is still opened.
> 
> How can I avoid this from happening?
> 
> Thanks a lot,
> Liat


Relevant Pages

  • Re: datetimepicker question
    ... using the control. ... either a ComboBox or TextBox for inputting the year value? ... ' Set first day of month ... depending on what you want your user to see. ...
    (microsoft.public.vb.controls)
  • Re: Combobox Display Problem
    ... ' Find the record that matches the control. ... Header section of the form (subform), ... text field containing the Item Names, the Combobox comes up empty. ...
    (microsoft.public.access.forms)
  • Re: My workaround
    ... Or if you just want to do it for one particular control you can respond to its resize event: ... private void comboBox1_Resize(object sender, EventArgs e) ... focus leaves each combobox. ... however override the selection in the focus/enter events, ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: VBA search coding problem -- Combobox Example
    ... Use a combobox to pick the code and then they can only choose one that DOES exists ... a control to be used for searching will be unbound, so whatever record is on the screen will not be changed. ... using ID in the fieldname implies that fieldname was created using an autonumber field in the main table and is defined to be a long integer in related tables. ... For instance, if you have a People table, define a PID autonumber field. ...
    (microsoft.public.access.modulesdaovba)
  • Re: VBA search coding problem -- Combobox Example
    ... a control to be used for searching will be unbound, ... using a combobox will solve this ... fieldname was created using an autonumber field in the main table and is ... For instance, if you have a People table, define a PID ...
    (microsoft.public.access.modulesdaovba)