Darren DICK
d.dick at uws.edu.au
Wed Feb 18 20:54:32 CST 2004
Thanks Bryan Vlad and Stuart et al The first post I saw this morning was from Stuart - I tried his SQL and away she went - excellent. Many thanks to those who replied this list is awesome Darren ----- Original Message ----- From: "Stuart McLachlan" <stuart at lexacorp.com.pg> To: "Access Developers discussion and problemsolving" <accessd at databaseadvisors.com> Sent: Wednesday, February 18, 2004 5:17 PM Subject: Re: [AccessD] A2K: Can anyone tell me why this fails? > I'd guess that FomattedStudentID is a text filed in which case you > need: > > FROM tblStudents WHERE (((tblStudents.FormattedStudentID)='" & > [Forms]![frmStudentSearch]![txtStudentIDSearch] & "'));" > > Note the single quote after the "=" and before the first ")" in the > second line. > > On 18 Feb 2004 at 16:53, Darren DICK wrote: > > > Thanks Steve > > Now I get > > Data Type mismatch in expression as the error message > > > > ----- Original Message ----- > > From: "Developer" <Developer at UltraDNT.com> > > To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> > > Sent: Wednesday, February 18, 2004 4:29 PM > > Subject: RE: [AccessD] A2K: Can anyone tell me why this fails? > > > > > > > You hve to build the string like this: > > > > > > selSQL = "SELECT tblStudents.StudentID, tblStudents.FormattedStudentID > > > FROM tblStudents WHERE (((tblStudents.FormattedStudentID)=" & > > > [Forms]![frmStudentSearch]![txtStudentIDSearch] & "));" > > > > > > --Steve > > > > > -- > Lexacorp Ltd > http://www.lexacorp.com.pg > Information Technology Consultancy, Software Development,System Support. > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com