Report To Open Based On Comobox Selection

May 9, 2013

I have some code that was written by someone else. I am trying to duplicate this in another database but, can't seem to get it to work. I also don't understand how this code is working as as there is no reference to the combo box in the code behind the print button. But depending on what you select in the combo box the report opens and filters on that selection. The following code is behind the print button. There is a separate combo box, that does not seem to have a connection to the print button. It just has a query behind it for the items to select from.

Public Sub BTNPrint_Project__Job__Numbers_Click()
On Error GoTo Err_BTNPrint_Project__Job__Numbers_Click
Dim stDocName As String
stDocName = "RPTProject Number (Job) Book Year"
DoCmd.OpenReport stDocName, acPreview
Exit_BTNPrint_Project__Job__Numbers_Clic:
Exit Sub
Err_BTNPrint_Project__Job__Numbers_Click:
MsgBox Err.Description
Resume Exit_BTNPrint_Project__Job__Numbers_Clic

View Replies


ADVERTISEMENT

Forms :: Open Report Based On Combo Box Selection?

Jan 29, 2014

I am struggling to pull out a report based on the combo box selection. I have NOI database and want to pull out a report for a specific customer that how many NOIs are generated by this customer..

I have a separate table of customer and another table of NCRs and the customer information comes from customer table.

I have tried the below statement but gives me an error message:

code for Macro that pulls the report in click event:

[CustomerName]=[forms]![CustName]![combocust1]

do i need to mention the report as well in some where in report ?

View 14 Replies View Related

Open New Form Based On Listbox Selection

Oct 25, 2005

I have a form which has a listbox listing all the letters a student has had sent home. Basically i want to be able to click on a letter in the list box and for a popup form to open with the record details. However it just brings up a blank record.

The list box has a unique field called standardletterID.

the code behind the button to filter was just used through the wizard to open the popup form is:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmstandardletterspopup"

stLinkCriteria = "[StandardLetterID]=" & Me![List0]
DoCmd.OpenForm stDocName, , , stLinkCriteria

but it doesnt seem to be working :(

I thought this would be easy but no matter how much i destroy my database trying to do it its not playing ball!

View 1 Replies View Related

Forms :: Open New Form Based On Combo Box Selection

May 26, 2013

I have "donations" form with a cbo called "DonationType".

(frmDonations.DonationType)

General
Employee Match
Employer Match
Angels*
Friends*
Royal Crown*

The last three options need to redirect the user to a different form used for pledged donations.

View 2 Replies View Related

Forms :: Open Form Based On Combobox Selection

Feb 12, 2014

I have three different forms.

1. form is a Login form where i choose between: AA, HH or FA

After choosing on my first form second form opens.

Now my question - how can i do the following:

Based on the combobox in form 1, my button i form 2 will either open form 3, 4 or 5...

View 1 Replies View Related

Run A Query/report Based On Selection From List

Feb 10, 2006

Dear all, is it possible to run a query (or ideally a report) based on a selection from a drop down list in a form? (in accsess 97). The reson being is i have a big list of of codes for different absence reasons & at present the user has to type in the correct code to display the data in a report based on the code they enter, however its not easy for users to remember which code to type in to run a report.

Idealy what i would like is a drop down list with the absence codes & the absence desciption next to each code, then when the user selects a code from the list it displays the corresponding data in the report?

Is this possible?, any help would be much appreciated, thanks.

View 4 Replies View Related

How To Generate Report Based On Combo Box Selection

Jun 30, 2005

Hi guys . I created a form that has 3 combo boxes. Their name are Project Number, year and weekno . It has also a button that on click action supposed to generate a report baced on my combo box criteria and then loads that report for me. could any expert show me an example on how to do this. I have difficulty finding an example in google since i did not exactly what is called this method of generating report in access 2000.Thanks

View 2 Replies View Related

Reports :: Get A Report Based On A Selection From A Combo Box

Jun 16, 2015

I am trying to get a report based on a selection from a combo box. The issue is many fold. Firstly I have been playing around with it so much that I have messed up the syntax and can't remember what I had. Here is what I have at the moment (this is based on a button):

DoCmd.OpenReport "RepClassrooms", acViewPreview, , " Class = '" & Me.cmboRepClass & "'"

The second issue is that it isn't filtering on the combobox - it gives all the data from the database based on all the entries in the combobox but this is probably down to the syntax again.

View 2 Replies View Related

Print Report Based On Checkbox Selection

Oct 19, 2015

I'm having difficulties with building a printing option for specific goods selected on the list.

I have a form which contains a subform. On the main form user is able to select supplier and based on the supplier can choose article that he's interested in. On the subform user gets the list of all the goods that are connected with that specific article.

I want be able now to select specific goods from subform list (using checkbox value) and based on the selection print a separate label for each goods.

View 4 Replies View Related

Emailing A Report Based On A Combo Box Selection

Dec 10, 2013

I am using access 2010...and i have a form with a combobox on it...and in that combobox shows a list of employees names. When i currently select the name of the person that i want, it creates their own individual report of their workload.What I want to do is to be able to select that person and it generates their individual report and then attaches it in an email to that individual.

View 9 Replies View Related

Print Specific Report Based On Combo Selection?

Apr 18, 2006

Hi

I need to print a specific form based on the selection made on a combo box.

I have been able to set it up to open the relevant form when the user selects an option from the combo box, but am unable to find a way to be able to print the specific report based on the selection.

I have a command button which prints a report based on the data in my current form, but would like it to also print the specific form based on the combo box selection.

Is this possible, and if so how is it possible?

Thanks in advance,

me

View 5 Replies View Related

Reports :: Opening A Report Based On Combobox Selection

Sep 24, 2013

I am trying to run a report based on a combobox selection. I have three different reports, each for the three different items in the combo box. I just don't know how to code it so when I run the report, it picks up the name in the combo box and opens the correct report. This is what my code looks like for the button that will run the report:

Private Sub Command7_Click()
DoCmd.OpenReport ("Signers Authorized for Check Writing"), acViewPreview, , WhereCondition = [BTrans] = "Check Writing"
DoCmd.OpenReport ("Signers Authorized for Stop Payment"), acViewPreview, , WhereCondition = [BTrans] = "Stop Payments"
DoCmd.OpenReport ("Signers Authorized for Wires"), acViewPreview, , WhereCondition = [BTrans] = "Wires"
End Sub

The problem is, that as soon as I hit the Run Report button, all three reports open up, so it is not reading what is in the combo box. The quotes, "Check Writing" , "Stop Payments" and "Wires" are the actual selections in the combobox and [BTrans] is the name of the combobox.

View 4 Replies View Related

Reports :: Hyperlink One Report To Another Based On Field Selection

Nov 29, 2013

I have a report that shows me an employee number that pulls data from the database, once that information is pulled, it shows me the results, I need to look another level down. Is there a way to put in a hyperlink to another report from the original report? example: Employee number 22 jobs worked on: 2214, 2218, 3222 From within this report, I would like to open job 2214 Is this possible?

View 2 Replies View Related

Filter Access Report Based On Check Box Selection

Oct 31, 2011

I have a query that gives field values like name, age, department, etc for all the staff members in our company. These fields are obtained from many other tables and queries. Now I am planning to generate a report, which would display the results of this query. The catch is I am trying to do it in such a way that I want the user to have the option to select for which staff members he wants to run the report. Example: if I have 10 staff members, the user should be able to select staff3, staff6, staff7 and run the report such that it displays all the field values from the query related ONLY to these 3 staff members.

I could put up some labels and checkboxes for each staff on the form, and then select some checkboxes and get the report to read which checkbox is selected, and then display the concerned results through the report.

View 3 Replies View Related

Forms :: Filter A Report Based On Listbox Selection - Apostrophe In Results

Feb 17, 2014

I use the follwing code to filter a report based on the listbox selection on a form. Below is the code I use, the problem it will error if the results have an apostrophe in the string.

Private Sub FilterDesc_Click()
Dim strWhere As String
Dim ctl As Control
Dim varItem As Variant
'make sure a selection has been made
If Me.ListCarrier.ItemsSelected.Count = 0 Then
MsgBox "Must select at least 1 Carrier"

[Code] ....

View 7 Replies View Related

Open Report Based On List Box Result?

Oct 24, 2013

I am trying to setup a button that will open a report on click. The catch is that the report name is coming from a query result that is populated into a list box. The way it works the list box will never have more than one result so by default it will always house the name of the report appropriate to a chosen client. I would like to do it this way so that I don't have to clutter up the from with extra buttons all pointing to specific reports.

I found some references to this in this forum, including the example listed below, but I have been unsucessful in making work so I assume that I am entering wrong, entering it the wrong place or maybe the code is incomplete. Unfortunately I am a complete novice to Access VBA so I am still learning how it all works together.

List box name is BillingFormat

The first of 5 reports is named Standard Billing

So in the form I enter the client number and BillingFormat is auto populated with Standard Billing

I tied the button to this code: DoCmd.OpenReport Me.BillingFormat, acPreview

The results I was looking for was for the report named Standard Billing would open. The first way I set it up nothing happened not even any errors. The other way threw an error stating it did not recognize DoCmd as a valid function.

what I am doing wrong?

View 7 Replies View Related

Modules & VBA :: Open Report With Subreport Based On Unbound Form

Apr 14, 2015

I am trying to open a report (rptGMX-IRG) that includes a sub-report (srptRG) based on criteria that is set with two unbound fields on a form (frmGMXbook). This form has two dropdown boxes (cboGMX_No & cboMachSize) and a command button. The first dropdown box includes data located in the main form and the second dropdown includes data that is part of the sub-report.

I can get the report to open properly when I enter data into both fields on frmGMXbook.

However, the problem I am having is the inability to have one or both fields be "Like '*'" and show all associated records.

Here is the code I have on the command button.

Private Sub GMX_Preview_Click()
Dim strCriteria As String
If IsNull(Me.cboGMX_No) Then
strCriteria = "[cboGMX_No] Like '*'"
Else
strCriteria = "[GMX_No] ='" & Me.cboGMX_No.Value & "'"

[Code] ....

View 1 Replies View Related

Forms :: Open Query Based Report On Form With Matching Record

Nov 25, 2013

This is my data:

Table: "Facility Info"
Data in the table: "facility", "city", "date", etc.
Query: "Q Facility"
Report: "R Facility"
Form: "Main Form" is where the data is entered that goes into the "Facility Info" table.

In the "Main Form" there is a dropdown box where I can select the "facility".I would like to add a button to this form that opens my report "R Facility". But this report is a collection of all the facilities and I would like it to just report the ones for the facility that I selected from the dropdown box on my "Main Form".

View 9 Replies View Related

Use Combo Box Selection To Open The Table

Feb 17, 2005

I have created a combo box with the values I need from a table. Once I select the correct record from the drop down box I'd like to be able to open the table with just that one record being displayed. Thanks for your help.

View 3 Replies View Related

Open A Form With A Combo Box Selection??

Nov 24, 2005

Hello,

Please help, I am still kind of new to Access. My problem is. I need to be able to open a form from a selection of a combo box. Thank you in advance.

View 3 Replies View Related

Reports :: Can Create A Date Parameter Box Open Up / When Open Report

Sep 21, 2014

I have a report based on a query that has data for many dates. At the moment I have put a specific date in the criteria of the query so that I could build the report format. So it now displays all the data for the date i have in the criteria section. I will need to run this report several times per week so the specified date (and corresponding data in the report) will need to be changed to a new date when I open the report i.e. when I open my report I want to show data in the report only for a specified date.

Can I create a date parameter box open up when I open the report? Can I create a form with a button that when I click will open the report displaying data for that date? What would be the best way?I also need to display the specified date on the report.

View 5 Replies View Related

Open A Form Depending On Selection Off List Box

Aug 23, 2006

Hi

I have a form, with 2 Combo Box's and a List Box. The Combo Box's provide a search criteria and the results are displayed in the list box [searchList].

I want to be able to double click a record in this List box [searchList] and that will open a from [frm_SearchDisplay] with the selected record from that List Box [searchList]

Can someone please point me in the right direction.

Thanks in Advance

H

View 2 Replies View Related

Open Form/record With Listbox Selection

Sep 26, 2006

Hi,

Need help on a list box issue. Solution is probably real simple, just can't see it with my bleary eyes.

I have a form (INSTLKP) with only a list box (List6) based on a table ((tblPersData) with fields PersdataID; SSN; Last; First; MI) on it. When I open the form up, the listbox does display all records associated withthe table. I would like to doubleclick on a desired SSN in the list box and have that record open up in a form (Perssub1) in edit mode.

And that is where the rub is... I have the following code in the On doubleclick event of List6


Private Sub List6_DblClick(Cancel As Integer)

DoCmd.OpenForm "Perssub1", , , "[PersDataID]= " & Me.List6, , acWindowNormal

End Sub


All it does it just open a blank Perssub1 form. Any ideas on what I'm missing?

:confused: Hawg1

View 6 Replies View Related

Combo Box Selection To Determine Which Form To Open

Jul 13, 2005

Hi don't know if I'm trying to do something that can't be done but I'll give it a try

I have a combo box which selects a type of incident e.g. report, SIF, Phone call etc

and dependent on what is selected I would like to get access to automatically select which form to open so if report is open when the command button is clicked then the report form would be opened, when SIF is selected the SIF form would be opened etc...

How do I go about this.. I have only ever wrote code in excel, so can I have step by step if it involves code (which I guess it does) including where to put the code and even how to go about it

Thanks in advance to all

View 6 Replies View Related

Forms :: How To Open Subform By The Selection From Combo Box

Feb 4, 2014

I have a form that contains a form (Contain business data) and a then a sub form that hold the companies history of donations. BUT I also have another forms that hold miscellaneous data that I would like to look at also in the sub form area.

I want to select the sub form by a combo box to show the "sub forms"I want to look at by selecting a menu from a combo box.

I have worked with Access for years but some reason the combo box has always been difficult for me to completely understand.

View 1 Replies View Related

Forms :: Using Combo Box Selection To Open Form And Goto Record

Jan 14, 2014

I have a combo box called Combo9 in form NavigationF, the combo box displays the results of FollowUpQ Query. What I would like to do is when the user selects a row from the combobox is closes NavigationF and opens ContactHistoryF and goes to the record selected in the combo box. I have made sure that the combobox contains CustomerID which is the primary key for my table.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved