Leading Zero Help Needed With Access To VB6 - CPT6

Computer Science and ICT discussion, revision, exam and homework help.

Announcements Posted on
Ask me ANYTHING - Andrew O'Neill - Buzzcocks comedian, amateur occultist, vegan... 22-05-2013
IMPORTANT: You must wait until midnight (morning exams)/4.30AM (afternoon exams) to discuss Edexcel exams and until 1pm/6pm the following day for STEP and IB exams. Please read before posting, including for rules for practical and oral exams. 28-04-2013
Sign in to Reply
  1. DrummingDanny's Avatar
    • New Member
    • Location: Cheshire
    • Posts: 1
    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
  2. Coursework.info's Avatar
    • Retired TSR Help Bot
    • Location: That galaxy over there
    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.
Sign in to Reply
Share this discussion:  
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.