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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|