473,587 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to open a specific report from a specific column in combobox

547 Contributor
I have a combobox called "cmb_FindXC " that is filtered based on the mainform selection of a race.
fields in combobox
Distance - txtfield - column1
TotalLaps - numberfield - column2
Laprace - yes/no - column3
Racename - txtfield
Racedate - datefield
The 2nd column in combobox, is the Totallaps field.
When you select a "distance" in combobox, and this distance have ie the value 5 in the Totallaps field in column 2, then it must open XCReport5;

If you select a distance and it has ie 8 in the 2nd Totallaps column, then it must open XCReport8; etc etc etc

I have 8 different reports called report1-8 and they must be opened depending on the value in the Totallaps column 2 of the "cmb_FindXC " combox.
The value of the Totallaps column (1-8) may vary depending on the race, and it is therefore important that the XCReport1-8 is linked to this field when opening the report.

The query behind the combobox is called "Rt_XCSortQ "
(XC stands for cross-country)

i imagine it must be something to this effect in the afterupdate event of the "cmb_FindXC "
just need the finer details
Expand|Select|Wrap|Line Numbers
  1. If "cmb_FindXC.Column.[2] = 1 then DoCmd.OpenReport "XCReport1", acViewPreview
  2. elseif "cmb_FindXC.Column.[2] = 2 then DoCmd.OpenReport "XCReport2", acViewPreview
  3. etc etc  till you get to 8th XCreport.
  4. elseif "cmb_FindXC.Column.[2] = 8 then DoCmd.OpenReport "XCReport8", acViewPreview
would a list box be easier to use in this instance?
Nov 28 '10 #1
1 1286
ADezii
8,834 Recognized Expert Expert
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmb_FindXC_AfterUpdate()
  2. If Not IsNull(Me![cmb_FindXC]) Then
  3.   DoCmd.OpenReport "XCReport" & CStr(Me![cmb_FindXC].Column(2)), acViewPreview
  4. End If
  5. End Sub
Nov 28 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

27
3256
by: DraguVaso | last post by:
Hi, The Multi column comboBox is a well spoken control, that a lot of people desire, and a lot of people buildtheir own. I tested a lot of them, but none really was what i wanted to have. But does anybody knows where I can find the best Multi column combobox? One that supports a lot of columns, possiblities to get the values in each column...
2
4520
by: jaYPee | last post by:
i have search a lot of newsgroup and some website to find a sample for multi column combobox in datagrid but no luck. there are so many sample i found but it is not located in datagrid. i would be very glad if you can direct me to a website that has this sample thanks in advance.
2
2480
by: Bob | last post by:
I have a regular C# form with a button on it. I want to click the button and open the report. What code do I need to open the report? Thanks-in-advance. Bob
0
1203
by: mike11d11 | last post by:
I have a form with a dataset that contains account records in one table and another table that contains transactions for accounts that are in the other table. I'm trying to create a report based on the two tables using an inner join. I used the report wizard to create my report and when I open it it just sits there not populating like it is...
11
20151
by: billa856 | last post by:
Hi, I have project in MS Access.In that I have one form in which there is one combobox .I want to know when I select an item from that combobox and click on submit button then it should open a report which filter data from table.So i only want specific data from table in report based on selection of item from combobox in a form. Can anyone...
0
224
by: Kelii | last post by:
evenlater, ok, so i think the thing that we have to get our heads around here is that there is no way to identify the selected fields in a recordsource without first opening the report. so, i would abandon this way of thinking altogether and start to get my head around a different way to accomplish the same objective; i.e., give the user...
3
2069
by: Naushad | last post by:
Hi All, I am trying to open the report conditionally from the dialogue box form. In the form there are three field. cboEmployees StartDate EndDate I have used these field in criteria to open the report. If I use the
1
3128
by: vgarzon | last post by:
Hi, I'm having issues setting a multi-column combobox in the right way. What I'm trying to do is that when I click on a table (access 2007 subform), a form should fill with the values of the record I clicked on. No problem until I have to fill correctly a multi-column combo for 2 reasons: - In the table I only have the value of one of...
4
5938
by: heart01 | last post by:
I find myself here again...I am using access 2007 and I have three Reports. What I am thinking I would like to do is have a single list box.combo box? whereby I can select a report and then be able to and or select a date range for that report and then be able to print. I hope this makes sense... so select a specific report Product ...
6
1985
by: SusanK4305 | last post by:
Here are my two code for the Report that will be opened. This Report is in Access and is name rpt1, It isn't opening like it should. Please Help... Thank you. Private Sub cmdApplyFilter_Click() Dim varItem As Variant Dim strAction_Types_Choices As String Dim strReason_Choices As String Dim strPosition As String Dim...
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8347
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.