473,473 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Crosstab header with a period

I have a report based on a Crosstab query. The crosstab puts city names as
columns. This worked fine until the users added St. Louis. In the query,
Jet substitutes St_ Louis, but the report bombs, with a message that Jet
couldn't find a field named St.[ Louis]. Anyone have a suggestion how to
deal with this?
Nov 12 '05 #1
1 1381
Randy Harris wrote:
I have a report based on a Crosstab query. The crosstab puts city names as
columns. This worked fine until the users added St. Louis. In the query,
Jet substitutes St_ Louis, but the report bombs, with a message that Jet
couldn't find a field named St.[ Louis]. Anyone have a suggestion how to
deal with this?


Maybe in the query change something to
CityName:IIF(Instr([City],".") = 0,[City],
Left([City],Instr([City],".") -1 &
Mid([City],Instr([City],".") +1)

Basically, the above remioves the period from the city if a period exists in
the name. You could also pass the city name to a function
CityName : CleanUpCity([City])
and create a function that removes anything that isn't an alpha character so
you can remove dashes and periods and numbers and apostrophes.

Function CleanUpCity(varCity As Variant) As Variant
If Not IsNull(varCity) Then
Dim strHold As String
Dim intFor As Integer
For intFor = 1 to len(varCity)
If (Ucase(Mid(varCity,intFor,1) >= "A" and _
Ucase(Mid(varCity,intFor,1) <= "Z") Or
Mid(varCity,intFor,1) = " " then
CleanUpCity = CleanUpCity & Mid(varCity,intFor,1)
endif
next
endif
endfunction

This removes anything not an alpha or space. You would need to change
references to City to CityName.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James Neumann | last post by:
Environment: Access 2k, win2k Business Problem: I have to display returns on investments made over a period of years, and show the amount of return earned on each investment by year. For...
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: Paula | last post by:
I need to do a summary using a crosstab query. The data has a Date field (Not named "Date"). I can do the Row Heading and Value but am having trouble with the Column Heading. The summary Columns...
2
by: deejayquai | last post by:
Hi I'm trying to produce a report based on a dynamic crosstab. Ultimately i'd like the report to actually become a sub report within a student end of year record of achievement. The dynamic...
0
by: Tom | last post by:
Hi: I'm using a crosstab query to export data to an Excel spreadsheet for further processing. The source of the data for the crosstab is a temporary table. The temp table has 3 fields: *...
23
by: helm | last post by:
Folks, could anyone advise ... Is there a significant difference in crosstab capabilities in Access and Excel? Using Office XP 2002 ... to produce a crosstab report I developed it in Excel from...
2
by: hwalker | last post by:
Hello all. Long time reader, first time poster :) I'm creating a repot that shows "the last two weeks of data the next 6 weeks of data, week over week". So, I have a calculated field called...
8
by: Paul H | last post by:
I want to base a form on a crosstab query. The query shows statistics for a user defined period. The column headings will look something like this: ClientID Month01 Month02 Month03 etc.. ...
14
ollyb303
by: ollyb303 | last post by:
Hi, I am trying to create a dynamic crosstab report which will display number of calls handled (I work for a call centre) per day grouped by supervisor. I have one crosstab query (Query1) which...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.