473,324 Members | 2,356 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,324 software developers and data experts.

How can I input a name into a reprort

I'd like to have a name show up on a report.
I have a report based on a query. When the report is activated it asks for
a name. I input the name and the query sorts the data and displays it in
the report.
How can I get that name to appear in the report, like a caption? It has to
be able to change each time a different name is entered.
Thanks,
Don............
Nov 13 '05 #1
5 1441
I am assuming the prompt is coming from a query prompt.

There couple ways I can quickly think of:

My prefered method is to put your input on a form. Then have the query
and report get their data from the form. I like forms because they
look nicer and you can do nicer things such as pull down menus.

Another way is to put your prompt in to calculation field of your
query. For example: Field: [Query Prompt]. Then on the report,
create a text box that is bound to that field on the query.

Nov 13 '05 #2
On Sat, 01 Oct 2005 15:56:09 GMT, "Don Sealer" <vz******@verizon.net>
wrote:

I'm assuming the prompt for a name is implemented in the query.
Something like:
select * from Customers where State=[Give State:]

One option is to replace this by:
select * from Customers where State=Forms!MyCriteriaForm!MyTextbox
and then create a criteria form with a text box to ask for the state.
Then the report can have a textbox with a controlsource of:
=Forms!MyCriteriaForm!MyTextbox

The criteria form is nice for other reasons as well, including more
elaborate validation and a better UI: in this case you'd probably have
a dropdownlist of states rather than a textbox.

-Tom.

I'd like to have a name show up on a report.
I have a report based on a query. When the report is activated it asks for
a name. I input the name and the query sorts the data and displays it in
the report.
How can I get that name to appear in the report, like a caption? It has to
be able to change each time a different name is entered.
Thanks,
Don............


Nov 13 '05 #3
Don:

You've been given good suggestions, but the simplest was missed.
You have a query like this ...

SELECT * FROM tblClients WHERE [ClientName] = [Supply Client Name]

Add another field with the value set to the exact verbage you're using in
the criteria line ... like this ...

SELECT *, [Supply Client Name] As SuppliedClientName FROM tblClients
WHERE [ClientName] = [Supply Client Name]

If both user supplied values are identical (spelled the same) you'll be
prompted only once, but the report will now have an additional field
exposed to it named [SuppliedClientName]. Set this as the control source
for a text box on your report, and you're done.

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast/

"Don Sealer" <vz******@verizon.net> wrote ...
I'd like to have a name show up on a report.
I have a report based on a query. When the report is activated it asks for
a name. I input the name and the query sorts the data and displays it in
the report.
How can I get that name to appear in the report, like a caption? It has to
be able to change each time a different name is entered.
Thanks,
Don............

Nov 13 '05 #4
Thanks for your reply. I've got to tell you when you say add another field
I'm lost. I'm not sure where or how to enter it. This is the SQL for the
query but I'm not sure where and how to enter it. I've tried a couple of
ways but I keep getting error messages. How do I add a line to something
like this?
Thanks,
Don..........

SELECT Service.Date, Service.Name, [charge by hour]*10.8571428 AS Hours,
[charge by Day]*80 AS Days
FROM Service
WHERE (((Service.Date) Between [forms]![set date].[start date] And
[forms]![set date].[end date]) AND ((Service.Name) Like [enter name]))
ORDER BY Service.Date;

"Danny J. Lesandrini" <dl*********@hotmail.com> wrote in message
news:tp********************@comcast.com...
Don:

You've been given good suggestions, but the simplest was missed.
You have a query like this ...

SELECT * FROM tblClients WHERE [ClientName] = [Supply Client Name]

Add another field with the value set to the exact verbage you're using in
the criteria line ... like this ...

SELECT *, [Supply Client Name] As SuppliedClientName FROM tblClients
WHERE [ClientName] = [Supply Client Name]

If both user supplied values are identical (spelled the same) you'll be
prompted only once, but the report will now have an additional field
exposed to it named [SuppliedClientName]. Set this as the control source
for a text box on your report, and you're done.

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast/

"Don Sealer" <vz******@verizon.net> wrote ...
I'd like to have a name show up on a report.
I have a report based on a query. When the report is activated it asks for a name. I input the name and the query sorts the data and displays it in the report.
How can I get that name to appear in the report, like a caption? It has to be able to change each time a different name is entered.
Thanks,
Don............


Nov 13 '05 #5
Just paste this SQL in the query SQL window ...

SELECT Service.Date, Service.Name, [charge by hour]*10.8571428 AS Hours,
[charge by Day]*80 AS Days,
[charge by hour] As ChargeByHour, [charge by day] As ChargeByDay
FROM Service
WHERE (((Service.Date) Between [forms]![set date].[start date] And
[forms]![set date].[end date]) AND ((Service.Name) Like [enter name]))
ORDER BY Service.Date;

The new fields, ChargeByHour and ChargeBy day will now be visible to your
report. They will show up in the field selector dialog, but you'll only be asked
to supply each of them once, since they are spelled exactly the same in both
places they are used.
--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast/

"Don Sealer" <vz******@verizon.net> wrote in message news:D_Q%e.7861$DO2.3807@trndny06...
Thanks for your reply. I've got to tell you when you say add another field
I'm lost. I'm not sure where or how to enter it. This is the SQL for the
query but I'm not sure where and how to enter it. I've tried a couple of
ways but I keep getting error messages. How do I add a line to something
like this?
Thanks,
Don..........

SELECT Service.Date, Service.Name, [charge by hour]*10.8571428 AS Hours,
[charge by Day]*80 AS Days
FROM Service
WHERE (((Service.Date) Between [forms]![set date].[start date] And
[forms]![set date].[end date]) AND ((Service.Name) Like [enter name]))
ORDER BY Service.Date;

"Danny J. Lesandrini" <dl*********@hotmail.com> wrote in message
news:tp********************@comcast.com...
Don:

You've been given good suggestions, but the simplest was missed.
You have a query like this ...

SELECT * FROM tblClients WHERE [ClientName] = [Supply Client Name]

Add another field with the value set to the exact verbage you're using in
the criteria line ... like this ...

SELECT *, [Supply Client Name] As SuppliedClientName FROM tblClients
WHERE [ClientName] = [Supply Client Name]

If both user supplied values are identical (spelled the same) you'll be
prompted only once, but the report will now have an additional field
exposed to it named [SuppliedClientName]. Set this as the control source
for a text box on your report, and you're done.

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast/

"Don Sealer" <vz******@verizon.net> wrote ...
> I'd like to have a name show up on a report.
> I have a report based on a query. When the report is activated it asks for > a name. I input the name and the query sorts the data and displays it in > the report.
> How can I get that name to appear in the report, like a caption? It has to > be able to change each time a different name is entered.
> Thanks,
> Don............
>
>



Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gotcha | last post by:
I have a little code to add multiple items to a shopping cart based page. This code works perfect, but it adds all of the info to the same input fields every time it loops. I need it to change...
2
by: J_axx | last post by:
Wow I was told this is a grate place for info I did not believe um but I was wrong I have 4 ASP pages on my site & a DB for each page has a form pointing at its DB, I thought this would be the...
3
by: david | last post by:
HI! Im trying to make "HTML form" into automatic. 1. If I get 18 numbers like: A B C D E F . . . . 2. How can I put those 18 numbers automatically into 6 numbers format like: A B C D E F
4
by: j.t.w | last post by:
Hi All. I'm having a problem with my Date of Birth textbox. When I open the ..htm file, the "DoB" textbox is flat with a border. All of my other textboxes are sunken and are yellow. When I...
3
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table...
3
by: cbradio | last post by:
Hi, I am having trouble developing a form in a restricted environment. My sample code is found below my message (sorry I don't have a URL). Basically, without a doctype, the form displays properly...
18
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
1
by: tcertain | last post by:
I am totally duh at javascript although I have 2 books trying to learn it. I am trying to add values to a form and have a calculate total at end. this is my form script. I have hours at end of...
1
by: printline | last post by:
Hello All I'm quite new to xml vs. PHP, so i hope someone can help with an issue i have been struggeling with. I have an html form, that when submitted, it should create an xml file, and save...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.