A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Search criteria between - and



 
 
Thread Tools Display Modes
  #1  
Old March 7th, 2010, 07:36 PM posted to microsoft.public.access
Leif Thorsen
external usenet poster
 
Posts: 31
Default Search criteria between - and

I have a table containing let´s say 5 posts – A,B,C,D and E.
Then I make a selecting question with query conditions like “Between C and H”
The result then will be C,D and E.
If I want to make a report from this result and I in the header of this
report want to have

“This report contains posts between C and H”

How will I achive this ???

--
Thanks in advance for Your help
  #2  
Old March 7th, 2010, 08:01 PM posted to microsoft.public.access
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Search criteria between - and

The usual way to give the user a way to select criteria is by unbound
controls on a form. In your case you need a way for the user to select C and
H. You could use a form named FrmCriteria with two comboboxes named
FirstLetter and LastLetter. Your query then would have the criteria:
Between Forms!FrmCriteria!FirstLetter And Forms!FrmCriteria!LastLetter

You would need to insure that the form was open (perhaps not visible) when
the report opened so the recordsource query could find the two criteria
fields.

To get "This report contains posts between C and H" in the report header,
all you need is a textbox in the report header with the following expression
in the control source:
=""This report contains posts between " & Forms!FrmCriteria!FirstLetter & "
and " & Forms!FrmCriteria!LastLetter

watch for wrapping

Steve





"Leif Thorsen" wrote in message
...
I have a table containing lets say 5 posts - A,B,C,D and E.
Then I make a selecting question with query conditions like "Between C and
H"
The result then will be C,D and E.
If I want to make a report from this result and I in the header of this
report want to have

"This report contains posts between C and H"

How will I achive this ???

--
Thanks in advance for Your help



  #3  
Old March 9th, 2010, 10:18 AM posted to microsoft.public.access
Leif Thorsen
external usenet poster
 
Posts: 31
Default Search criteria between - and

Steve !!

Thank You for Your answer !!
But is there no way to pick up the expressions inside the two (or four
depending how You see it) brackets [ ] within the query instead for making a
separate form for it ??
The reason for my wish is that I already have a command buttom in form for
"Print me a report" and don´t want to open a new form when I already is
working in one.
--
Thanks in advance for Your help


"Steve" wrote:

The usual way to give the user a way to select criteria is by unbound
controls on a form. In your case you need a way for the user to select C and
H. You could use a form named FrmCriteria with two comboboxes named
FirstLetter and LastLetter. Your query then would have the criteria:
Between Forms!FrmCriteria!FirstLetter And Forms!FrmCriteria!LastLetter

You would need to insure that the form was open (perhaps not visible) when
the report opened so the recordsource query could find the two criteria
fields.

To get "This report contains posts between C and H" in the report header,
all you need is a textbox in the report header with the following expression
in the control source:
=""This report contains posts between " & Forms!FrmCriteria!FirstLetter & "
and " & Forms!FrmCriteria!LastLetter

watch for wrapping

Steve





"Leif Thorsen" wrote in message
...
I have a table containing let´s say 5 posts - A,B,C,D and E.
Then I make a selecting question with query conditions like "Between C and
H"
The result then will be C,D and E.
If I want to make a report from this result and I in the header of this
report want to have

"This report contains posts between C and H"

How will I achive this ???

--
Thanks in advance for Your help



.

  #4  
Old March 9th, 2010, 04:25 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Search criteria between - and

On Tue, 9 Mar 2010 02:18:02 -0800, Leif Thorsen
wrote:

Steve !!

Thank You for Your answer !!
But is there no way to pick up the expressions inside the two (or four
depending how You see it) brackets [ ] within the query instead for making a
separate form for it ??
The reason for my wish is that I already have a command buttom in form for
"Print me a report" and dont want to open a new form when I already is
working in one.


You can put textboxes on your current form and reference them; you don't need
to open a separate form.
--

John W. Vinson [MVP]
  #5  
Old March 13th, 2010, 05:35 PM posted to microsoft.public.access
De Jager
external usenet poster
 
Posts: 393
Default Search criteria between - and


"Leif Thorsen" wrote in message
...
Steve !!

Thank You for Your answer !!
But is there no way to pick up the expressions inside the two (or four
depending how You see it) brackets [ ] within the query instead for
making a
separate form for it ??
The reason for my wish is that I already have a command buttom in form for
"Print me a report" and don´t want to open a new form when I already is
working in one.
--
Thanks in advance for Your help


"Steve" wrote:

The usual way to give the user a way to select criteria is by unbound
controls on a form. In your case you need a way for the user to select C
and
H. You could use a form named FrmCriteria with two comboboxes named
FirstLetter and LastLetter. Your query then would have the criteria:
Between Forms!FrmCriteria!FirstLetter And Forms!FrmCriteria!LastLetter

You would need to insure that the form was open (perhaps not visible)
when
the report opened so the recordsource query could find the two criteria
fields.

To get "This report contains posts between C and H" in the report header,
all you need is a textbox in the report header with the following
expression
in the control source:
=""This report contains posts between " & Forms!FrmCriteria!FirstLetter &
"
and " & Forms!FrmCriteria!LastLetter

watch for wrapping

Steve





"Leif Thorsen" wrote in message
...
I have a table containing let´s say 5 posts - A,B,C,D and E.
Then I make a selecting question with query conditions like "Between C
and
H"
The result then will be C,D and E.
If I want to make a report from this result and I in the header of this
report want to have

"This report contains posts between C and H"

How will I achive this ???

--
Thanks in advance for Your help



.


  #7  
Old April 19th, 2010, 05:55 PM posted to microsoft.public.access
valeria del colle
external usenet poster
 
Posts: 6
Default Search criteria between - and


"Leif Thorsen" ha scritto nel
messaggio ...
Steve !!

Thank You for Your answer !!
But is there no way to pick up the expressions inside the two (or four
depending how You see it) brackets [ ] within the query instead for
making a
separate form for it ??
The reason for my wish is that I already have a command buttom in form for
"Print me a report" and don´t want to open a new form when I already is
working in one.
--
Thanks in advance for Your help


"Steve" wrote:

The usual way to give the user a way to select criteria is by unbound
controls on a form. In your case you need a way for the user to select C
and
H. You could use a form named FrmCriteria with two comboboxes named
FirstLetter and LastLetter. Your query then would have the criteria:
Between Forms!FrmCriteria!FirstLetter And Forms!FrmCriteria!LastLetter

You would need to insure that the form was open (perhaps not visible)
when
the report opened so the recordsource query could find the two criteria
fields.

To get "This report contains posts between C and H" in the report header,
all you need is a textbox in the report header with the following
expression
in the control source:
=""This report contains posts between " & Forms!FrmCriteria!FirstLetter &
"
and " & Forms!FrmCriteria!LastLetter

watch for wrapping

Steve





"Leif Thorsen" wrote in message
...
I have a table containing let´s say 5 posts - A,B,C,D and E.
Then I make a selecting question with query conditions like "Between C
and
H"
The result then will be C,D and E.
If I want to make a report from this result and I in the header of this
report want to have

"This report contains posts between C and H"

How will I achive this ???

--
Thanks in advance for Your help



.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.