How to populate Access Database Using Checkboxes? - vb.net

I am trying to populate one column in an Access table using two check boxes - one for 0, one for 10. How do I make it so that on click or after update, whichever check box is checked populates the cell with the associated number?
Any assistance (if there's a better way to choose from two values?) would be much appreciated.
Regards,
Steve

A check box does not seem to me appropriate for selecting between 0 and 10, since
you cannot bind it as such to field in your table
it is a control commonly associated with Yes/No values
I would rather go here with an Option group (if you have enough space) or with a combo box (drop down list).
You did not mention if the field is Required nor the type of field. If field is not Required (meaning it must handle Null value), go for the Combo.

A toggle button is probably more what you're looking for. A drop down list would work as well.

Related

Holding parameter values when report is refreshed due to custom buttons used for expand/collapse groups

This may be as simple as it can't be done, but I have to ask. :) I am building a report using Report Builder 3.0. The report contains a table which also has Grouping established. I wanted to give the user an easy way to expand/collapse all rows of the table, so I used the method of creating a parameter with two values (0 for collapse, 1 for expand), tied the visibility of the group to the parameter using an expression in the Hidden Property for the group. Then I created two text boxes for Expand and Collapse and added the respective parameter/value in the Action in the text box properties.
At this point, everything works as intended. Here is where I run into the issue. I added another parameter, lets just call it "Location". The parameter is a text data type that allows multiple values and gets it available values from dataset/query in the same report. This is where I am guessing what I want may not be possible. When I select my Location(s), then run the report it all looks good. However, when I click on one of the Expand/Collapse text boxes, it clears out the values that I selected for the location(s). I am guessing this is due to the fact that the available values for the Location parameter is set via a query at run time. Is there any way to maintain the values for the Location parameter when triggering the expand/collapse buttons?
Thanks in advance!

Combo Box on form to filter table I imported into Access from Excel

I have been searching for a couple of hours but I can only see examples of combo boxes on forms filtering tables that are based from queries.
My table (which I have put on a subForm) is from a static datasheet that I imported into Access from Excel so therefore does not come from a query.
I want to use a combobox (or a textbox) so that the user can enter in the reference number and it will filter the table (rather than using the filters already provided (as they just get confused))
Is this even possible? I should add, the reason why I want the table showing (and not a query from it) is that I want the user to be able to edit the table once they have found the reference number they are looking for.
Any help would be much appreciated.
You can use the form's filter method to programatically filter the rows. careful though, as you probably are going to need a mechanism to remove the filter, like a separate button as it won't be obvious. OR, you may still want to keep the form's "Navigation Buttons" property to true. this would then have allow the user to see that the rows are filtered, and also allow them to remove the filter.
Use the form's filter methods to filter. so say they want to filter on a field called "value1" with value of 1, it would be like this. if your filter condition is text, then use single qoutes around them.
Me.Filter = "[value1] = 1"
Me.FilterOn = True
I think your question is more about a ComboBox updating a view, right. I don't think this really has anything to do with Excel, right. If this is correct, please see the link below.
http://www.fontstuff.com/access/acctut17.htm
Also, see this.
http://www.fontstuff.com/access/acctut18.htm

How to perform multiple selections in a Qlikview Straight Table?

How would I go about making multiple selections in a QlikView straight table?
For example, how would I select the 1st and 5th rows at the same time?
There is a section about multiple selections in the QlikView 11 - Reference Manual :
14.5 Multiple Selection Within a Field
Multiple selections within a field (from one lisstrong textt box) can be made in a number of ways:
Position the cursor in the list box, then drag it over a number of field values while pressing the
mouse button.
Click the first field value to be selected, then CTRL-click each additional selection.
Click the top item to be selected, then SHIFT-click the bottom item to be selected. This way all the
items in between will be selected. However, if the sort mechanism is on, the first selection may cause
the order to change, which makes it difficult to make a correct second selection.
Confirm a text search (see below) by hitting the ENTER key. This will result in all matching field
values being selected. By keeping the CTRL key depressed while pressing ENTER the selections
from the text search will be added to previous selections.
To deselect a previously made additional selection, CTRL-click it.
If a multiple selection is made in one list box, and make a new selection from the available optional values
in another list box, some of the selected values in the first list box may get excluded. However, when the
selection in the second list box is canceled, the previous selections will, by default, be recovered.
A multiple selection can be interpreted in two different ways, either as a logical or or as a logical and.
Default is logical or, i.e. QlikView will find a solution that is associated to one or more of the selected field
values.
HTH
For straight tables, you can only select items next to each other. Ctrl-Select only works for listboxes

how to add items to combo box in lightswitch

I'm new to lightswitch and i searched lot, but couldn't find proper solution for this simple question. I need to add items to combo box, based on user selection. ( not from existing table)
For example if user select country ,following towns must add to combo box.
USA - Texas, New York etc
UK - London , Surrey
How can i do this? i'm using vb.net as my back end. i found this article How to create an unbound combobox as useful one. but couldn't able work according to my scenario.
what is the way to add items to combo box?
In Lightswitch, if you want to have a dynamic set of data bound to a control, that data must be in a table. You then need to create a query that filters the data in that table based on the user's selection and bind your control to that query.
Here is a pair of articles that describes implementing a situation that is similar to yours:
Nested AutoCompleteBox for data entry
Nested AutoCompleteBox for data entry Part 2
We can't directly assign our own values to combo box. we have to use either data table ( as mentioned by embedded.kyle ) or we have to create custom control to assign values.
i have used custom User Control for above scenario. detail step that i followed can be found in following Link
Adding a record that doesn't already exist in a bound table is a very common scenario. Unfortunately, there's no out-of-the-box way to do this in LightSwitch, you simply have to write code to achieve it, like in this blog post.
Add non existent records using AutoCompleteBox
Or, of course as was also suggested, you could create a custom control to do the job.

ms-access the ability to enter multiple values into a textbox on a form

i have a textbox on a form and i would like the user to be able to choose from different values but also be able to enter their own values, how do i do this?
i would like to clarify that the user should be able to enter multiple values into the same textbox
I suggest that you don't. A subform to a table of values related to the main table would seem to be the way to go. You can make data entry for the field a combo that is not limited to list. Often a link back to the sub-table will suit in such a case.