I recently lost my Windows system files and am having problems re-creating the settings I had on Access 2000 to get round the Visual Basic limitation of dates having to be in US rather than international dates.
The tables I use including tblPlayerClub (below) are in international dates
The relevant section of the VB subroutine is as follows
...
datPrior = #1/6/1992# ' ' 1st June 1992
strSQLAllPurchases = "SELECT PLAYER_TEAM,Joined, Fee FROM tblPlayerClub WHERE FEE > 0 AND JOINED > #" & datPrior & "#;"
Set rst1 = dbs.OpenRecordset(strSQLAllPurchases)
With rst1
rst1.MoveFirst
Do Until rst1.EOF()
strPlayer_Team = rst1!PLAYER_TEAM
datJoined = rst1!Joined
numFee = rst1!Fee
Debug.Print strPlayer_Team, datJoined, numFee
strSQLTransferFee = "SELECT PLAYER_TEAM,Fee,Joined FROM tblPlayerClub WHERE FEE > " & numFee & " AND Joined <= #" & datJoined & "# AND Joined > #" & datPrior & "# ORDER BY FEE DESC;"
...
The first SQL string creates a datPrior of 06/01/92 ( I could have hard-coded this) and produces a correct listing where Joined is after 1st June 1992
The first record in the recordset rst1 has a Joined value of 15th May 1998 but this is shown as
15/05/98 in the second SQL statement rather than 5/15/98, - unlike the datPrior - so I have a mixture of international and US dates which produces erroneous results
I have played around with reformatting and looking to change underlying table with no luck but as this
worked perfectly before my problems without any changes to code their should be a simple explanation
I have tried both US and UK regional settings in the Control panel but that does not appear to make any difference
Any help would be much appreciated
The tables I use including tblPlayerClub (below) are in international dates
The relevant section of the VB subroutine is as follows
...
datPrior = #1/6/1992# ' ' 1st June 1992
strSQLAllPurchases = "SELECT PLAYER_TEAM,Joined, Fee FROM tblPlayerClub WHERE FEE > 0 AND JOINED > #" & datPrior & "#;"
Set rst1 = dbs.OpenRecordset(strSQLAllPurchases)
With rst1
rst1.MoveFirst
Do Until rst1.EOF()
strPlayer_Team = rst1!PLAYER_TEAM
datJoined = rst1!Joined
numFee = rst1!Fee
Debug.Print strPlayer_Team, datJoined, numFee
strSQLTransferFee = "SELECT PLAYER_TEAM,Fee,Joined FROM tblPlayerClub WHERE FEE > " & numFee & " AND Joined <= #" & datJoined & "# AND Joined > #" & datPrior & "# ORDER BY FEE DESC;"
...
The first SQL string creates a datPrior of 06/01/92 ( I could have hard-coded this) and produces a correct listing where Joined is after 1st June 1992
The first record in the recordset rst1 has a Joined value of 15th May 1998 but this is shown as
15/05/98 in the second SQL statement rather than 5/15/98, - unlike the datPrior - so I have a mixture of international and US dates which produces erroneous results
I have played around with reformatting and looking to change underlying table with no luck but as this
worked perfectly before my problems without any changes to code their should be a simple explanation
I have tried both US and UK regional settings in the Control panel but that does not appear to make any difference
Any help would be much appreciated