Leading Zero Help Needed With Access To VB6 - CPT6
Computer Science and ICT discussion, revision, exam and homework help.
-
Leading Zero Help Needed With Access To VB6 - CPT6
Hi
Im currently writing a program for a waste management system and have come up with a problem.
When I try to retrieve a date from the access database using SQL in Visual Basic, I select the date from a combo box and on the click event of the combo box it should bring up the available BatchID's that were entered on this date.
For Example: BatchID's 7,8 and 9 were entered on the 21/02/2008 so if I selected that date, it would show those BatchIDs in a seperate List Box.
However, when I try to select a date with a leading zero (EG 06/02/2008) it finds the record from the access database but for some reason it doesnt display the available BatchIDs from this date. Ive tried formatting the date in the access database as "d/mm/yyyy" but it still doesnt return the values into Visual Basic. Ive also tried putting in a Message Box just after the SQL to see what it is returning:
SELECT `BatchID` FROM `tblBatch` WHERE `Date` = #06/02/2008#
So it seems to be returning the values, but it doesnt list the values of the BatchID from this date into the List Box. I have a feeling its something to do with the format of the date?
Any ideas?
Thanks -
Leading Zero Help Needed With Access To VB6 - CPT6
As it's been a while since you posted and nobody's responded, maybe you want to check out MarkedbyTeachers.com - the UK's largest academic coursework library.
They have over 130,000 coursework documents at GCSE, A Level and University level.
They submit all their documents to Turnitin anti-plagiarism software and the site is used and approved by hundreds of thousands of UK teachers and students.