473,378 Members | 1,609 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,378 software developers and data experts.

Format report using crosstab query

AccessIdiot
493 256MB
Hello all,

I have a report that is based on a crosstab query. One of the fields in the crosstab query is based on a query. It is a coded value. When I look at the crosstab query it displays the value. But when I look at the report I get the coded value.

For example, in the table it is;

1 apple
2 orange
3 banana

When I look at the crosstab query it displays: apple, orange, banana
When I look at the report it displays: 1, 2, 3

Any ideas?

thanks!
Jan 2 '08 #1
2 1855
puppydogbuddy
1,923 Expert 1GB
Hello all,

I have a report that is based on a crosstab query. One of the fields in the crosstab query is based on a query. It is a coded value. When I look at the crosstab query it displays the value. But when I look at the report I get the coded value.

For example, in the table it is;

1 apple
2 orange
3 banana

When I look at the crosstab query it displays: apple, orange, banana
When I look at the report it displays: 1, 2, 3

Any ideas?

thanks!
Here is one way you can resolve your problem: assuming for purposes of illustration, your textbox with coded value is named txtCode, and its control source is fldCode. You need to replace the illustrative names with the actual names in your application.
1. Move txtCode to a place in the same vicinity, where you can hide it by setting its visible property to false after testing is complete.
2. Place another textbox where txtCode used to be before you moved it. Name the new textbox something like txtDescription. This assumes the underlying field name in the table is fldDescription.
3.Place the following expression in the control source property of txtDescription. The syntax used assumes that fldCode is numeric. If it isn't, the syntax will have to be changed.
= DLookup("[fldDescription]", "YourTable", "[fldCode] = " & Report!fldCode)
Jan 3 '08 #2
AccessIdiot
493 256MB
That worked beautifully, thank you!
Jan 3 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: Edward | last post by:
ACCESS 2k I need to design a report based on a rota system for staff at various shops. The data is effectively stored in a single table, along the lines of: Initials (e.g. BH, FG, RM etc.)...
4
by: No Spam | last post by:
Dear Access 2000 users, I have a crosstab query that puts together certain information perfectly. It has a criteria that is based on a form that limits how many columns are returned based on...
15
by: Richard Hollenbeck | last post by:
I tried to ask this question before on the 14th of January but I never got a reply. I'm still struggling with the problem. I'll try to rephrase the question: I have a crosstab query with rows...
3
by: deejayquai | last post by:
Hi I've created a crosstab query and displayed it as a sub-report in my main report. This is fine until the data changes and the column names become incorrect. I know I have to create a...
3
by: Bryan | last post by:
I've been looking over this newsgroup, but I can't find an answer to my problem. I see that a few others have posted this issue over the years, but none of them got a response. I'll give it...
2
by: carl.barrett | last post by:
Hi, I'm back with the same question as I still can't get it to display my data the way I want it to. The table lists information about a perpetrator involved with an anti social behaviour...
2
by: Ecohouse | last post by:
I'm using Access 2002. I'm creating a report dynamically using a crosstab query. I found the code for this on the Microsoft site. I noticed that the report doesn't go past six pages. How can I...
6
kcdoell
by: kcdoell | last post by:
Hello: I have a report that is based on the following crosstab query: SELECT tblProduct.ProductName, QryProd_Bud.GWP_BUD, Nz(,0) AS Week_1, Nz(,0) AS Week_2, Nz(,0) AS Week_3, Nz(,0) AS Week_4,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.