Hello everybody, I'm new to this forum, so sorry if i post something that has been already answered althought i couldn't find it in search. Anyway, there it goes:
i have a search system which gives you the values you search for in a list box. The list box has its "Multi Select" property set to "Extended" which allows you to pick specific records from the list box. I also have a button to allow you to produce a report based on the values u've selected from the list box. the button is based on a sub and a function, here is the code for both:
Function :
Private Function GetCriteria() As String
Dim stDocCriteria As String
Dim VarItm As Variant
For Each VarItm In lstContList.Ite msSelected
stDocCriteria = stDocCriteria & "[LifeID] = " & lstContList.Col umn(0, VarItm) & " OR "
Next
If stDocCriteria <> "" Then
stDocCriteria = Left(stDocCrite ria, Len(stDocCriter ia) - 4)
Else
stDocCriteria = "True"
End If
GetCriteria = stDocCriteria
End Function
Button to execute the function :
Private Sub cmdRpt_Click()
DoCmd.OpenRepor t "rptContLif e", acPreview, , GetCriteria()
End Sub
So the question is: Since I only have 1 query and 1 report in my system and I want to keep it this way, can i assign a title to the report by clicking the button? Either through a list of pre-typed titles or a manual input. The way I picture it is basicly you select the values you need from the list box, press the button, a input box comes up asking you to input the report title, you input "Values I want" and you get a report generated with the title "Values I want"
Is this possible?
Looking forward to your answer,
Yours truly novice access user.
p.s. im in access 2007
3 1584
Hi
You could try assigning the input "Values I want" to a hidden Textbox control on the form before the report is opened and link the reports Title Textbox control back the hidden Textbox on the form that launches it (assuming that this form remains open or hidden while the report is open).
HTH ?
MTB
But i need the user to be able to input any report title they want. They wont be able to change the values in the hidden text box. and im not really sure how to link a text box with a caption, or is it now what u mean ? ;)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: N. Demos |
last post by:
How do you dynamically assign a function to an element's event with
specific parameters?
I know that the code is different for MSIE and Mozilla, and need to know
how to do this for both.
I have the following event handler functions defined and need to assign
them to table elements (<TD>) created dynamically in another function.
function handleMouseOver(elt, cssClass, strURL)
|
by: DerekM |
last post by:
I have a database project that I created with several forms and
reports. I would like to be able to declare a single title and be
able to change the title on all the forms and reports by changing a
single variable. I think this is possible, however I don't know
Visual Basic very well. I created a module named DBcommon with the
following statements in it:
Option Compare Database
Global Const DBname As String = "Title String"
|
by: PeterHardy |
last post by:
Hi
I'm having a problem removing the title from a subreport. The report
is built into a main report but every time you run it there is a title
that appears which is the name of the subreport. I cannot seem to find
where to remove this and don't want it showing. Could anyone help by
pointing me in the right direction.
Thanks
|
by: Paul via AccessMonster.com |
last post by:
I have a report with some Unbound text boxes. I want to shows the values in
these text boxes from my VBA code. How can I assign the valuse thru code ?
Pls help me.
--
Message posted via http://www.accessmonster.com
|
by: Leor Amikam |
last post by:
I want to use a css element and apply it to all labels on a page with the
"asp:label" tag.
I defined a CSS class:
..cls1
{
font-weight: bold;
color: royalblue;
font-family: Verdana;
| |
by: ApexData |
last post by:
Hello
I'm using Access2000, SplitDB, ALL MenuBars are Off. The
AccessTitleBar(BlueBar) displays at the top with its (Min/Max/)
Controlbox.
I have a MainMenuForm (Modal-On), that Calls a ReportMenuForm
(Modal-On) that lets me select a REPORT. If I set the ReportMenuForm
(Popup-On) and I select a REPORT, the AccessTitleBar becomes disable (a
good thing), however the REPORT displays underneath the ReportMenuForm
|
by: mpmason14 |
last post by:
how can i create the title for my report based on the filtered criteria in a form? the form opens the report and i want the report to have the title of what was filtered.
the user can filter among many things (usually only one, though) on the form, and i would like to get whatever was filtered on the report as the title
i have the basics down, like having an unbound text box and having = in there to show what is being filtered, but i want...
|
by: djsdaddy |
last post by:
Good Day to All, This is my first post to the scripts, and I'm glad to be part of a community of experts that can pull me out of the holes that I sometimes dig for myself. I am running XP and Access 2002 in 2000 mode.
I have a report that prints a reminder to members of the status of pledges that they have made. I want to be able to turn on a flag for each member in the query underlying the report (or somewhere else if it is advisable) to...
|
by: johnners |
last post by:
Hi all
I'm having trouble assigning an attribute to a namespace using nusoap/php when creating a new soapclient. I can get the soapclient to assign the parameters correctly but can't assign an attribute to any namespaces. The code below is from the actual soap request and i need to assign the 'ApplicantID' from the soapclient to the Applicant parameter for each new applicant, then have nested arrays within various arrays.
<Applicant...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |