Dynamic / Static items in radComboBox. (SQL Query error) - sql

I am using telerik's rad combo boxes (dropdowns) on my aspx page. there are 3 rad combo boxes and they are cascading dropdowns. the items in the final dropdown is dependent on the selection of the 2nd dropdown.
Now, i had to insert a "select all" option in the final dropdown. this being a static value, i added it using "appenddatabounditems" property of the rad combo box, setting it to be true. I can now see the select all option, but the items in the dropdown list are repeated. I have used the distinct keyword in the query. Also, when i make another selection in the 2nd dropdown box, the values in the third dropdown are appended i.e they show "Select all" + items of the previously selected 2nd dropdown option + values of the currently selected dropdown selection.
Am i missing something in the query? or there is something wrong with the telerik controls? or the ajax manager?
PLease help.
Thanks,
ghanshyam.

Are you using the EnableLoadOnDemand="true" setting to perform the cascade? The combo box does not clear the old items out automatically. Two things you can do:
Delete the old items OR
Bind the entire list to the combo box and hide the invalid ones. This has worked for us when the list is relatively small.
HTH.

Related

MS Access - FIlter subform based off listbx

I am trying to filter a subform based off a value selected in a listbox.
My list box is called cboCurrentListName and this is populated using a select query
The subform is called Form_subform_ListContents
For the change event for the list box I have the following code, however no filters are applied when its executed.
Me.Form_subform_ListContents.Form.Filter = "[ListName]=" & Me.cboCurrentListName.Value
Me.Form_subform_ListContents.Form.Filter = True
I have also tried using Master/Child links to execute this using the following steps, but this caused an input box to pop up when the fom loaded:
first I set the 'link child fields' option in the properties of the subform to 'ListName' (this is the field name that populates the list box and is present in the subform
then I set the 'link master fields' option in the properties of the subform to 'cboCurrentListName' (the listbox name)
then in the listbox properties I set the control source to 'cboCurrentListName'
The above steps cased an input box to pop up on opening the form (the value typed in here does filter the subform). However I don't want an input box in order to do this, I want to use the listbox.
I have googled this and fried different methods but have had no luck. I am pretty new to access and of the control source sections aren't a strong point of mine, which is why I tried to use the VBA on the event change instead
Any help would be appricaited, I tried a few things and had no luck.
EDIT: When trying the master/hild option I also get an error 'Can'y build a link between unbound forms' if I click the 3 dots in the poperties. SO for the above steps I had to manually type in the otpions.

sql show listbox values only when combobox is populated

Firstly, I'm pretty new to access so I apologise if this is basic but I can't find the right answer either.
I've had some help setting this up so there are parts that have been created that I don't fully comprehend.
I have created a form that is to be used for data entry which consists of the following fields:
TEAMS - Combobox the rowsource of which is a table TEAMS; CALLREASONS - Multi-Select Listbox the records of which currently exist in a table CALLREASONS; ACTIONS - Multi-Select Listbox the records of which currently exist in a table CALLACTIONS; SUBMIT - Button with VBA which sends selected data to a number of tables.
The database works fine and things a saving where they should be and in the format they should be, the problem I'm having is with the display of the form.
I would like for the form to display blank when opened and after each time a record is submitted. However, if I set the rowsource of the listboxes to the tables all options show when the form is loaded and after each submission the options and the previous selections show.
How can I make it so that the first listbox CALLREASONS only displays possible options once a selection has been made in the combobox TEAMS and the second listbox CALLACTIONS only displays possible options once at least one selection is made in the listbox CALLREASONS ?
Thanks in advance for any help.
You can either change the controls row sources on the Update or Enter events, or you can simply enable/disable them on the events.
Lets use 3 nested comboboxes for an example.
Combo1 Has rowsource set permanently as it is the top level.
Combo2 and Combo3 Have no rowsource set.
On the Enter event of Combo2, you can set the rowsource to
SELECT Pkey, DisplayText FROM tblOptions WHERE OptionGroupField = " & Forms!Form1!Combo1BoundField
On the Enter event of Combo3, you can set the rowsource to
SELECT Pkey, DisplayText FROM tblOptions WHERE OptionGroupField = " & Forms!Form1!Combo2BoundField
So on so forth.

MS Access: text box value show #Name?

I have created a form and set the form's RecordSource to a query. Below is my query:
SELECT GeneralT.*, SalaryT.[Status]
FROM GeneralT INNER JOIN SalaryT ON GeneralT.Deposits = SalaryT.Deposits;
In the form I have 4 textboxes. In the first 3 textboxes I show value from GeneralT table and in fourth textbox I show SalaryT.[Status] value. But this fourth value doesn't show in the textbox rather it show #Name?.
If I open the query in datasheet view I can see all the value properly. I don't understand what is wrong here. Please help me to show the result properly in the form.
Displaying #Name? for a field says that field has a control source that does not match with the query linked to the form. Some things to check:
Make sure Status is a selection from one of the pre-existing options in the Control Source drop down combo box. Click on the combo box to make sure.
Double check to make sure it is a "Text Box" and not a custom
control.
Make sure there isn't another text box named Status
Try chaning the control source to just Status instead of SalaryT.[Status]. If the field name does not conflict with the naming of a field in GeneralT, the selected SalaryT.[Status] will actually be displayed named Status.

Can not select an item in an unbound combo box in access

I have form that is not based on any table and I have a combobox on it that gets it data from a query (which hs id and text).
When I look at form in formview, I can open the dropdown section of combobox and it has values from the query, but I am not able to selct it. I tried to select it by any of the following ways:
1- Clicking on an item.
2- DBClicking on an item
3- Pressing ener on an item.
What is the problen and how can I fix it?
I am using Accesss 2003 on windows XP
Have you by accident set the Locked property to Yes? You can still drop down a locked combo-box but can't select any items.
See if your Form has property Allow Edits set to True.

Extjs4:Multiselect Option

In my form,i have a list of employees in a combo box and i need to map some employees to particular department.I need to change the combo-box to List box.Scenario is as follows,
1. List A contains all employees.
2. If i click 'Add' button the selected employees must move to list B
and list A must contain remaining employees
.
I searched for List box but i couldn't find in extjs4.
Is there any example or link for multiselect listbox in ext-js4?
Thanks
There is no built-in ListBox widget in ExtJs4. However, Ext.view.View may become an listbox after some manipulations.
Here is an example of such a tuned View. Demos may be found here, here and here (this one looks like just what you need).
You can create two such listboxes and the "add" button. Then assign handler to button which would remove selected item from the first listbox's store and add it to the second's store.