View Full Version : Same query different result win2k / xp


runningman
04-13-2008, 12:20 PM
Hi,

I have the following query in a access 2000 db

SELECT [5k1].[Race Number], [5k1].[Name], [5k1].[Club], Date()-[Date of birth] AS Age, [5k1].[Handicap Time], [5k1].[Male / Female], [5k1].[Date of birth], [5k1].[handmin], [5k1].[handsecs], [tblRaceEntries].[intEntryRace1], [tblRaceEntries].[intEntryRace2], [tblRaceEntries].[intEntryRace3], [tblRaceEntries].[intEntryRace4], [tblRaceEntries].[intEntryRace5]
FROM 5k1 INNER JOIN tblRaceEntries ON [5k1].[Race Number]=[tblRaceEntries].[RaceNumber];


it is used as a means of input from a form.
When it is used in windows xp then all is good.
When it is used in windows 2k it doesn't work as I intended. The problem being that [5k1].[Race Number] field is reset with a default '0' value of [tblRaceEntries].[RaceNumber]

Whats the difference between the 2k/xp system that causes this.. what the solution?

many thanks

Uncle Gizmo
04-13-2008, 02:59 PM
1) --- You shouldn't use a field name named ].[Name], it's a reserved word

2) --- Its not a good idea to have field names with spaces in, could you change these?

3) --- Can you explain why you are sure that the 0 result comes from [tblRaceEntries].[RaceNumber]?

RuralGuy
04-13-2008, 02:59 PM
I'm not sure I understand what you say is happening. Are both fields numeric?

runningman
04-13-2008, 10:55 PM
3) --- Can you explain why you are sure that the 0 result comes from [tblRaceEntries].[RaceNumber]?

My assumption is based on when you enter data the [5k1].[Race Number] field is the first field you fill in lets say its number 200, I then fill in the rest of the details. Its only when I enter information into any of the fields in the tblRaceEntries that the [5k1].[Race Number] field (in windows 2000) resets / defaults to '0'

I'm not sure I understand what you say is happening. Are both fields numeric?

yup both are numeric.