Sort Access Report by language

E

Eric_G

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.
 
M

Marshall Barton

Eric_G said:
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.
 
E

Eric_G

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 said:
Eric_G said:
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.
 
E

Eric_G

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 said:
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 said:
Eric_G said:
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.
 
M

Marshall Barton

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 said:
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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top