Access 2007 - drop down box in a Report - ms-access-2007

I need to create a drop-down box so that an employee can select a pre-set reason in the "RE:" field of a Report. There are only two selections that need to be in the box: "personal events" and "lack of adequate notice".
The report itself is already made and there are a number of fields that link back to the database - name, address, specific dates, etc that are already in the report. I've figured out how to make the drop-down box using the combo box function in a form but is there any way I can merge the combo box into the report?
I'm a beginner, by the way so I'm still figuring things out.

Currently your report sits on a query (query get relevant data from the table)
Steps to follow:-
Change the table by adding a column with the two options you just
mentioned above
Add combobox to Form with items as the two options
Adjust your query to use these options as a criteria to change
results returned by the query
Show the results in the report as you are showing right now.
If you have a code already, please post that snippet. So we can help you accordingly.
Some reference for you to get ideas
BUT I HAVE A DOUBT, ARE YOU TRYING TO SAY YOU WANT TO SWTICH BETWEEN TWO REPORTS BASED ON THE USER CHOICE SELECTED IN COMBOBOX?

Related

How to select field based from combobox in MS Access

I want a user to be able to choose the field they select from a table through the use of a combo box in an MS Access form. My combo box contains a list of all the field names in the table, and when the user selects one I want that field to be queried. Currently, the general syntax of my code looks like this but doesn't return any values when I run it.
SELECT FORMS![formName]!cboName
FROM tblName;
The form is working fine as far as I can tell so I'm pretty sure the issue is with my SQL but I can't figure out where. Any help is appreciated.

Limit Combobox input based on other control on same form

I have a database in access for which I made some forms, which is going pretty well.
I only have one small issue I am running into.
I have this form on which I have several comboboxes, which get their Row source from another table. That is working fine.
But for combobox B I wanted the options limited/filtered based on the selection in combobox A. So I filled the following in the row source of combobox B:
SELECT JOBS.Numbers
FROM JOBS
WHERE CITY = Me.CITY
So there is another combobox on the same before where the CITY is picked.
Now when open combobox B it asks me to fill in the city manually and then it filters/limits the options in the way I want. However, I want this to happen automatically based on the selection in combobox A (on the same form).
I hope you can help me.
Thanks in advance.
I find this feature very useful. For example I have a form where project managers select there name from a combobox(A) then in the next box(B) select their project. B uses the criteria from the first box to only list their projects.
Specifically the project table I pull the list from has an owner field. I use the name entered into A as criteria on the Owner to pull just their projects.
On the combobox query build I input the Owner criteria like this. The query runs then with whatever data is entered into boxA.
Forms![Main]![cboOwner]
On the first combo box "After Update" event add Me.ComboboxB.Requery. That will make combo box B refresh its contents based on the current value of combo box A every time A's value is changed.

Query MS-Access Form ComboBox

as the title suggests I am writing SQL out of excel vba to query Forms contents out of a MS-Access db. The SQL works fine however, the fields where combo boxes are, the SQL returns their index instead of the text field.
I spent some time googling this but most of the results are asking how to display on the form in the combo box, I am just trying to return the text display form the combo box with my SQL.
I will go ahead and say the person who designed this did a bad job, and the tables relating to these drops down have nothing in common(the tables are just a list of the drop down values and ID's).
My question is what is the best way to return this value? Can I join based off the drop down index?
This link should help you get started.
http://access.mvps.org/access/forms/frm0031.htm
Something like this, I presume...
Forms!Mainform.RecordSource

Open Report Based on Multiple Combo Box Selections (Access, VBA)

I have a set of reports stored in Access, and I am trying to generate a specific report based on multiple combo box selections and a "run report" button on a form.
For this example, Combo Box 1 = Location, and Combo Box 2 = Report Type.
Suppose I choose Toronto from Location, and Sales from Report Type. This means I'd like to generate the Sales Report for Toronto.
I have two issues - 1 major and 1 minor.
Major issue: I can currently only generate reports based on 1 combo box selection. My code is as follows:
DoCmd.OpenReport Forms!Form1!Loc, acViewPreview, , "[Loc]='Toronto'"
In order for this to work, I would need to have my sales report named as "Toronto". For the purpose of checking the code, I did that and it worked. However, I am trying to use multiple combo boxes and need more complex naming for my reports. How can I make it so that the code pulls the selection from multiple combo boxes and generates the corresponding report?
Minor issue:
When running the report, I get a popup message that asks me to specify location again:
location popup
How can I prevent this popup from appearing?
Any help is greatly appreciated!!
Are you using a query ? is the best option to do that.
that box that pops up is because you are trying to open the report but the data to the field "loc" is missing.

GridViewMultiComboBoxColumn: Allow User to Enter Data

I got a very straight forward Grid connected to a DataSet. I'm doing this in VISUAL BASIC. Using Telerik Winforms Q3 2013.
Every column is a text Column, 2 of them are Multi Column Combo Boxes, attached to a distinct dataset which just brings the possible information. And is only intended for reference.
I want to let the user be able to key into these columns any text they want regardless if it's on the list or not.
I looked at this post http://www.telerik.com/help/winforms/gridview-editors-howto-allow-end-users-to-add-items-to-dropdownlisteditor.html
But this example is just too confusing and most importantly, it saves to the ref/underlining ref dataset, which is not desirable.
How can I set up the comboboxes to allow users to enter any text they want.
Thanks
The Multi Column Combo Boxes are working with items, these items are gotten from the data source of the Multi Column Combo Box. So in order to allow freely typed text, the latter should be added to the data source.