SSRS make Textbox Dropdown list - sql

I am new to SSRS and I was wondering if I can make a textbox populated with a drop down list based on values that are not present in another textbox
For example: in textbox1 I have the value 1, and I want 2,3,4 to show up in textbox2 as dropdown list.
Is there such away to do that in SSRS?

I want textbox2 to be dropdown list that has all the items that has not been showing in textbox1. Textbox1 one is being populated based on the user input in the parameter. So it he user choose 2 the value in textbox1 should be 2 and the dropdown list (which I am calling it textbox2 here) show 1,3,4 only without 2

Related

Getting typed OR selected value from combo box

I have a combo box (myCB) in a form. The user can either select a drop down value or type a value in the box. When the user clicks a button, I want to get the value in the combo box for use in a query.
I am using myCB.Column(0) to grab the value. This works if the user has clicked a selection in the combo box. However, if the user has typed the value, then myCB.Column(0) is null. I have also tried myCB.Text and myCB.Value. Both give null.
How can I grab the combo box value regardless of whether it was selected or typed?
Edited to add properties:
Row Source: "SELECT DISTINCT Item FROM tblItems" (this is set in VBA code, and not in property sheet)
Bound Column: 1
Column Count: 1
Column Widths:
Control Source: ItemName
Figured it out. I was grabbing the combo box value after DoCmd.GoToRecord , "", acNewRec in the OnClick procedure, and the behavior was wonky. Running the value-testing stuff before a new record is accessed yields the correct behavior. Thank you everyone for your help.

MS-Access list box not updating based on conditional

I have Form!Main in access with 3 list boxes(choose a report, choose a cohort, choose a year) that grab data from the following respective tables (x_report_box, x_cohort_box, x_year_box).
The second box is populated based off the selection in the first box.
Consequently, the third box is populated based off the selection in the second box.
The second box gets populated just fine once I make a selection in the first box. However, the third box stays blank after I make a selection in the second box.
In the first box under the property sheet in the AfterUpdate I've added a Me.List2.Requery As well as for the second box Me.List3.Requery.
The code I used to populate the second box was
SELECT coh.cohort_name
FROM x_cohort_box AS coh
WHERE (((coh.report_id)=[Forms]![Main]![List1]));
The code I used to populate the third box was
SELECT yr.year_name
FROM x_year_box AS yr
WHERE (((yr.cohort_id)=[Forms]![Main]![List2]));
Any insight would be appreciated. Thanks!

Passing TextBox value between two UserForms

I have two user forms in Excel VBA. I enter a value in the TextBox at the first UserForm. How do I pass the value to the second UserForm to display same value in a TextBox too?
Assuming that your forms are named:
Userform1 for this first form
Userform2 for the second form
And assuming that you have two textboxes one in each form as follow:
TextBox1 for the first textbox located in your first form
TextBox2 for the second textbox located in the second form
You assign the value of the first TextBox1 to TextBox2 using Userform2.TextBox2.Text=Userform1.TextBox1.Text
You can declare a public variable:
i.e X. In user form 1 x=textbox1.value and in user form2 textbox2.value=X.

Pass criteria from a combo box to another combo box in access 2010

I am trying restrict the records in combo box 2 (cboNames) based on the selection of combo box 1 (cboClass).
Combo box 1 and combo box 2 are both based on records in the same table, tblNames.
Combo box 1's row source is set too
SELECT [tblNames].[ChildID], [tblNames].[Class] FROM tblNames;
Combo box 2's row source is set too:
SELECT tblNames.ChildID, tblNames.[Full Name], tblNames.Class FROM tblNames WHERE (((tblNames.Class)=[Forms]![frmInsertNewRecord]![cboClass]));
I was under the impression this should work but it obviously inst. Combo box 2 is blank.
Can anybody identify what i am doing wrong?
Once the value of the first combo box changes, you need to refresh the recordset of the second one.
You need to either hit the refresh button (F5) or add the following code in the _AfterUpdate event of the 1st box:
Private Sub cboClass_AfterUpdate()
Me.cboName.Requery
End Sub

combobox not showing default value even when set to dropdown list in vb.net

hi i have a combo box in a form which has the following values.cash sales,refund,debtor sales,debtor refund. i have added these values in the items collection.Following is the issue,the combo box during form load does not show the first value which is cash sales and which should be the default value displayed on form load.but its not showing.
I have even set the combo box style to drop down list but still its not showing.
![the combo box in form which has the mentioned issue][1]
Use this to show the default value by index:
ComboBox1.SelectedIndex = 0
Update:
Or if you cant determine the index in design time, you can use:
ComboBox1.SelectedIndex = ComboBox1.Items.IndexOf("defaultValue")