IF Function Help

S

SageOne

My Issue:

I will need to combine to records into one record and display information in
two columns.

My example:

I have a man who must take a certification exam every year to sell
insurance. When I extract the exam results in a spreadsheet it looks like
this....
Name Date
Joe Smith 20071001
Joe Smith 20081001

I need ot create an expression to combine these records into one to look
like this.......

Name 07 Test Date 08 Test Date
Joe Smith 20071001 20081001

Is this possible? If so how?
 
J

John Spencer

The crosstab query SQL might look like

TRANSFORM First(X.[Date]) as TheDate
Select X.[Name]
FROM SomeTable as X
GROUP BY X.Name
PIVOT Left(X.[Date],4)

In query design view, you do that with these steps
Open a new query
Add your table
Add the name field
Add the date field
Add a calculated column by entering
Left([TableName].[Date],4)
Select Query: Crosstab from the menu

Set Total and Crosstab to
Name: Group by / Row Heading
Date: First / Value
CalcColumn: Group By / Column Heading

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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