|
Prev: Testmail
Next: Sending this to toccaara
From: Fev on 7 Jul 2008 22:50 Hi I have a parameter query to display upcoming birthdays, however I seem to be getting inconsistent results. I have never had this problem in older versions of Access. My parameter queries are: Between [Enter Start day as a number] And [Enter End day as a number] for the expression: myDay: DatePart("d",[DateOfBirth]) [Enter the month as a number] for the expression myMonth: DatePart("m", [DateOfBirth]) I have 2 birthdays listed in January. 07 Jan 1956 and 01 Jan 1985 When I enter the following parameters: between 1 and 9 (for the days) and 1 for the month, both birthdays appear. However, when I enter between 1 and 15 (for the days) and 1 for the month, only the 01 Jan birthday appears. This appears when I mix single and double digit numbers for the days, but I have tried including leading 0's without success. I am also getting other inconsistencies for other birthdays. I have re-inputted the DOB's. I am running Windows XP, with the short date format set to dd/MM/yyyy. Thanks - any suggestions would be greatly appreciated Heather
From: Allen Browne on 8 Jul 2008 00:28 The issue suggests that Access may be treating the parameters as text instead of numbers. You may be able to fix this by declaring the parameters so Access knows they are numbers. In query design view, choose Parameters on the Query menu. Enter 3 rows in the dialog like this: [Enter Start day as a number] Long [Enter End day as a number] Long [Enter the month as a number] Long Post back if that doesn't fix it. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Fev" <hgoslin(a)worldonline.co.za> wrote in message news:d6754c50-1b18-46db-bd33-f4ba45215db3(a)k30g2000hse.googlegroups.com... > Hi > I have a parameter query to display upcoming birthdays, however I seem > to be getting inconsistent results. I have never had this problem in > older versions of Access. My parameter queries are: > Between [Enter Start day as a number] And [Enter End day as a number] > for the expression: > myDay: DatePart("d",[DateOfBirth]) > [Enter the month as a number] for the expression myMonth: DatePart("m", > [DateOfBirth]) > > I have 2 birthdays listed in January. 07 Jan 1956 and 01 Jan 1985 > When I enter the following parameters: between 1 and 9 (for the days) > and 1 for the month, both birthdays appear. > However, when I enter between 1 and 15 (for the days) and 1 for the > month, only the 01 Jan birthday appears. This appears when I mix > single and double digit numbers for the days, but I have tried > including leading 0's without success. I am also getting other > inconsistencies for other birthdays. I have re-inputted the DOB's. I > am running Windows XP, with the short date format set to dd/MM/yyyy. > > Thanks - any suggestions would be greatly appreciated > Heather
|
Pages: 1 Prev: Testmail Next: Sending this to toccaara |