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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sort Access Report by language



 
 
Thread Tools Display Modes
  #1  
Old August 3rd, 2007, 03:24 PM posted to microsoft.public.access.reports
Eric_G
external usenet poster
 
Posts: 34
Default Sort Access Report by language

I have created a detailed access report which I require to be sorted by
language (english and french). Currently, I have created two different
reports and I run the report against two different query files -- one which
selects "E" and one which selects "F". It would be alot easier if I could
run one "master report" datafile and simply have Access produce the report in
the proper language based on the lang field in the query. I believe WORD
does allow a user to do this by creating a MASTER document file and using a
MERGECODE such as INCLUDETEXT ENGLISH FILE and then INCLUDETEXT french file.
Is this possible within a single Access report? Thanks.
  #2  
Old August 3rd, 2007, 07:21 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Sort Access Report by language

Eric_G wrote:

I have created a detailed access report which I require to be sorted by
language (english and french). Currently, I have created two different
reports and I run the report against two different query files -- one which
selects "E" and one which selects "F". It would be alot easier if I could
run one "master report" datafile and simply have Access produce the report in
the proper language based on the lang field in the query. I believe WORD
does allow a user to do this by creating a MASTER document file and using a
MERGECODE such as INCLUDETEXT ENGLISH FILE and then INCLUDETEXT french file.
Is this possible within a single Access report? Thanks.



If you use a form button to open the report, you can use the
OpenReport methid's WhereCondition argument to filter the
report's records. e.g.

DoCmd.OpenReport "the report", acViewPreview, _
WhereCondition:= "[language field]='E'"

This way, the the report an its record source query can be
used for either language.

--
Marsh
MVP [MS Access]
  #3  
Old August 3rd, 2007, 08:42 PM posted to microsoft.public.access.reports
Eric_G
external usenet poster
 
Posts: 34
Default Sort Access Report by language

Pardon my ignorance, but how does one "open a form button"? I looking in
project explorer, and then hit "insert" but don't see "form button" as an
option.....

"Marshall Barton" wrote:

Eric_G wrote:

I have created a detailed access report which I require to be sorted by
language (english and french). Currently, I have created two different
reports and I run the report against two different query files -- one which
selects "E" and one which selects "F". It would be alot easier if I could
run one "master report" datafile and simply have Access produce the report in
the proper language based on the lang field in the query. I believe WORD
does allow a user to do this by creating a MASTER document file and using a
MERGECODE such as INCLUDETEXT ENGLISH FILE and then INCLUDETEXT french file.
Is this possible within a single Access report? Thanks.



If you use a form button to open the report, you can use the
OpenReport methid's WhereCondition argument to filter the
report's records. e.g.

DoCmd.OpenReport "the report", acViewPreview, _
WhereCondition:= "[language field]='E'"

This way, the the report an its record source query can be
used for either language.

--
Marsh
MVP [MS Access]

  #4  
Old August 3rd, 2007, 09:12 PM posted to microsoft.public.access.reports
Eric_G
external usenet poster
 
Posts: 34
Default Sort Access Report by language

Never mind -- I figured it out and it worked perfectly...... Saves me lots of
time.....

Can I add multiple conditions to the button and what would be the
appropriate command format based on multiple field values?

Many thanks.

"Eric_G" wrote:

Pardon my ignorance, but how does one "open a form button"? I looking in
project explorer, and then hit "insert" but don't see "form button" as an
option.....

"Marshall Barton" wrote:

Eric_G wrote:

I have created a detailed access report which I require to be sorted by
language (english and french). Currently, I have created two different
reports and I run the report against two different query files -- one which
selects "E" and one which selects "F". It would be alot easier if I could
run one "master report" datafile and simply have Access produce the report in
the proper language based on the lang field in the query. I believe WORD
does allow a user to do this by creating a MASTER document file and using a
MERGECODE such as INCLUDETEXT ENGLISH FILE and then INCLUDETEXT french file.
Is this possible within a single Access report? Thanks.



If you use a form button to open the report, you can use the
OpenReport methid's WhereCondition argument to filter the
report's records. e.g.

DoCmd.OpenReport "the report", acViewPreview, _
WhereCondition:= "[language field]='E'"

This way, the the report an its record source query can be
used for either language.

--
Marsh
MVP [MS Access]

  #5  
Old August 4th, 2007, 04:04 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Sort Access Report by language

The WhereCondition argument is any legal SQL WHERE clause
(without the word WHERE). It is a very powerful feature so
you should become familiar with at least that much of the
SQL language. In general you can have many conditions that
are combined with AND or OR with parenthesis to specify the
order that the conditions are evaluated.

A simple example with two conditions:

WhereCondition:= "[language field]='E' " _
& "AND [docID]=" & Me.txtDocID

The second condition is filtered by a value specified in a
text or combo box on the form. Note that number type fields
in the table do not use quotes around the filter value.
--
Marsh
MVP [MS Access]


Eric_G wrote:
Can I add multiple conditions to the button and what would be the
appropriate command format based on multiple field values?


Eric_G wrote:
I have created a detailed access report which I require to be sorted by
language (english and french). Currently, I have created two different
reports and I run the report against two different query files -- one which
selects "E" and one which selects "F". It would be alot easier if I could
run one "master report" datafile and simply have Access produce the report in
the proper language based on the lang field in the query. I believe WORD
does allow a user to do this by creating a MASTER document file and using a
MERGECODE such as INCLUDETEXT ENGLISH FILE and then INCLUDETEXT french file.
Is this possible within a single Access report? Thanks.


"Marshall Barton" wrote:
If you use a form button to open the report, you can use the
OpenReport methid's WhereCondition argument to filter the
report's records. e.g.

DoCmd.OpenReport "the report", acViewPreview, _
WhereCondition:= "[language field]='E'"

This way, the the report an its record source query can be
used for either language.

 




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 01:17 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.