473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Report asking for title (user input)

135 100+
Hello

I was wondering if it is possible to create a textbox in a report which will ask the user (user input) for the "title" he wants for the report.

Thanks
Sep 17 '07 #1
12 5727
Scott Price
1,384 Expert 1GB
Hello

I was wondering if it is possible to create a textbox in a report which will ask the user (user input) for the "title" he wants for the report.

Thanks
You can pop up an Input box in the OnClick event of your Print/Preview command button asking for the user's title preference. See the inputbox help file in VBA for examples, instructions on how to use them.

Then from the input box, programatically open the report and pass it the value of the input box as title.

Regards,
Scott
Sep 17 '07 #2
Gilberto
135 100+
You can pop up an Input box in the OnClick event of your Print/Preview command button asking for the user's title preference. See the inputbox help file in VBA for examples, instructions on how to use them.

Then from the input box, programatically open the report and pass it the value of the input box as title.

Regards,
Scott
Thanks for the reply Scott, i already read through help and the example there i was just wondering if there was a "simpler" way to do it.

I once left an unbounded textbox and i remember it asked me for the value and actually i think i wrote some test "questions" for this userinput i just cant remember whats the property where you can write this??? I already tried the control name, source, etc and nothing.

If this is not possible could you help me with some code just so that on opening the report it asks the user for the title???? Im really new on this.

Thanks again,
Gilberto
Sep 18 '07 #3
Scott Price
1,384 Expert 1GB
Thanks for the reply Scott, i already read through help and the example there i was just wondering if there was a "simpler" way to do it.

I once left an unbounded textbox and i remember it asked me for the value and actually i think i wrote some test "questions" for this userinput i just cant remember whats the property where you can write this??? I already tried the control name, source, etc and nothing.

If this is not possible could you help me with some code just so that on opening the report it asks the user for the title???? Im really new on this.

Thanks again,
Gilberto
No code needed probably. Your report should be bound to a query. Create an extra field in the query called Title: As WHERE criteria point it to a text box somewhere that doesn't exist. For example, Forms!FormNonExist!TitleTextBox.

Then whenever you open the report/query it will prompt for that parameter...

Regards,
Scott
Sep 18 '07 #4
Gilberto
135 100+
No code needed probably. Your report should be bound to a query. Create an extra field in the query called Title: As WHERE criteria point it to a text box somewhere that doesn't exist. For example, Forms!FormNonExist!TitleTextBox.

Then whenever you open the report/query it will prompt for that parameter...

Regards,
Scott
Thanks Scott i almost got it, i just dont understand where and what exactly to write after "WHERE". If i write the "Forms!FormNonExist!TitleTextBox" in the table property for the title in the query it tells me that that table doesnt exist that i have to select from the list.

Could you be a bit more specific i really am new here.
Thanks
Sep 18 '07 #5
Scott Price
1,384 Expert 1GB
Thanks Scott i almost got it, i just dont understand where and what exactly to write after "WHERE". If i write the "Forms!FormNonExist!TitleTextBox" in the table property for the title in the query it tells me that that table doesnt exist that i have to select from the list.

Could you be a bit more specific i really am new here.
Thanks
No problem! Go into the query design view grid. In an empty Field grid write this:
Expand|Select|Wrap|Line Numbers
  1. Title: [MyTitle]
Just that, nothing more! (you can adjust the language to suit your needs, but the format needs to stay the same and
you actually don't need the forms!... part..., now that I think about it more).

In your report, you will have a control, such as text box that you will bind to this new field in your query. Whenever the query is run (by opening the report, for example) it will prompt the user for this parameter, and then whatever they enter will show up in the query field, as well as whatever control is bound to that field.

Regards,
Scott
Sep 18 '07 #6
Gilberto
135 100+
No problem! Go into the query design view grid. In an empty Field grid write this:
Expand|Select|Wrap|Line Numbers
  1. Title: [MyTitle]
Just that, nothing more! (you can adjust the language to suit your needs, but the format needs to stay the same and
you actually don't need the forms!... part..., now that I think about it more).

In your report, you will have a control, such as text box that you will bind to this new field in your query. Whenever the query is run (by opening the report, for example) it will prompt the user for this parameter, and then whatever they enter will show up in the query field, as well as whatever control is bound to that field.

Regards,
Scott
Hello again Scott,

I have created the query. As you said in the field i only wrote: "Title: [Type a Title for the Report]", with no table or anything else. I saved the query as Title. So far if i run the query it does work...it asks me to "type a tutle for the report". Now my problem is "binding" it with the report. If i select the query as the REPORTS RECORD SOURCE: "SELECT Title.Title FROM Title;" and run the report i get the error: "query input must contain at least one table or query". And if i select the query as the TEXTBOX (title) control source: "=title!Title" i get a "#ERROR" as the textbox display.

I dont get if theres another way to "bind" the query and the report, as you tell me.

Sorry again, any more ideas???
Gilberto
Sep 19 '07 #7
ADezii
8,834 Expert 8TB
Hello

I was wondering if it is possible to create a textbox in a report which will ask the user (user input) for the "title" he wants for the report.

Thanks
This is a lot simpler than you think, Gilberto.
  1. Create a Text Box in the Report Header Section.
  2. Under Properties ==> Data Tab, for the Text Box, place the following line of code:
    Expand|Select|Wrap|Line Numbers
    1. =[Enter Report Title]
  3. When the Report opens, the User will see the Enter Report Title prompt, and whatever value he types in, will appear within that Text Box in the Report Header Section.
Sep 19 '07 #8
Scott Price
1,384 Expert 1GB
Go with ADezii's solution, because it is simpler.

However, to explain a little more what I was talking about:

Your report has to be based on a query already. The Title: [NewTitle] just goes into a new field in the existing query, not into a new query. Then it is available for use to bind to any control on the report.

Regards,
Scott
Sep 19 '07 #9
Gilberto
135 100+
This is a lot simpler than you think, Gilberto.
  1. Create a Text Box in the Report Header Section.
  2. Under Properties ==> Data Tab, for the Text Box, place the following line of code:
    Expand|Select|Wrap|Line Numbers
    1. =[Enter Report Title]
  3. When the Report opens, the User will see the Enter Report Title prompt, and whatever value he types in, will appear within that Text Box in the Report Header Section.
Indeed i was complicating things....however...i still CANT get it to work, and the worst thing is that ONCE, cant remember how...i managed to do it.

So i created the textbox named title. In the DATA tab i cant only find:
Control Source, input mask, running sum and smart tags. In CONTROL SOURCE im entering "=[Enter Report Title]". And all i get is the textbox displaying "#Name?".

Ive tied this on another report, a new report, etc etc and nothing...

Thanks
Sep 19 '07 #10
ADezii
8,834 Expert 8TB
Indeed i was complicating things....however...i still CANT get it to work, and the worst thing is that ONCE, cant remember how...i managed to do it.

So i created the textbox named title. In the DATA tab i cant only find:
Control Source, input mask, running sum and smart tags. In CONTROL SOURCE im entering "=[Enter Report Title]". And all i get is the textbox displaying "#Name?".

Ive tied this on another report, a new report, etc etc and nothing...

Thanks
Do NOT use Quotation Marks:
Expand|Select|Wrap|Line Numbers
  1. =[Enter Report Title]
Sep 19 '07 #11
Gilberto
135 100+
Do NOT use Quotation Marks:
Expand|Select|Wrap|Line Numbers
  1. =[Enter Report Title]
Sorry, indeed im NOT using " ", it was just to explain what im exactly writing.

HELP...
Sep 20 '07 #12
Gilberto
135 100+
Sorry, indeed im NOT using " ", it was just to explain what im exactly writing.

HELP...
Thanks for your help guys. The problem, as Scott mentioned, it was that my report WASNT based on ANY queries or tables. I just added a query and VOILA!

Thanks for your time and effort.
Gilberto
Sep 20 '07 #13

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

Similar topics

1
by: jandoca | last post by:
Hi, I am new to crystal reports and I have to build some reports and call them from an ASP page and display them. I am using Crystal Reports Developer 9.0 and the client has Professional 9.0. I...
1
by: Rajani | last post by:
Hello, I have a table(msaccess) with the structure... job_code text 6 style text 10 qty number fabrication text 65 ship_date date/time
3
by: Clare | last post by:
Hi I have a report that is made of 4 subreports. There is no actual information in the main report, and the record source is empty. In the Header section of the main report, I have a text box...
4
by: MLH | last post by:
From FormA or from the immediate window, what can I run to determine if a specified control (say, "MyComboBox") exists on FormB (or ReportB)? We could narrow it down, specifying that FormB (or...
2
by: Hexman | last post by:
Hello All, I'm nearing the end of my current project and the users came up with 2 more requests. I'll talk about the first one in this message. I've developed (with much help from this group)...
12
by: kabradley | last post by:
Hello, Thanks for looking at my post and hopefully having an answer or at least a suggestion to my problem. I currently work at a financial planning office that deals with many clients and accounts....
5
by: Dave Richardson | last post by:
Hi, I'm having a nightmare trying to use a form as the basis of capturing the number of copies that a user requires of a report to be printed. I originally used the input box as a solution, but...
3
by: gmazza via AccessMonster.com | last post by:
Hi there, I am trying to run a report using a parameter for where the user chooses a month from a combo box. Then on the report, I want it to compare the month to a date field and choose only...
3
by: Eugenio | last post by:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
tracyyun
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...
0
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,...
0
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...

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.