I hate running to the form every time i get stuck, but ive been thinking how to do this and im completly mythed!
I have a list box, lstMonthYear. It takes data from tblPurchaseInvoice, groups Date, and formats the date and fills the list box, eg,
List box shows:
January 2003
March 2003
June 2003
November 2003
etc etc...
Im trying to do some VB code, that takes the selected contents of the list box (multiple selection is on), and creates an sql string, the sql string will do various things, but once i have the basics i should be able to code it on my own.
I was looking at a loop that goes down the list box, determins if the date is selected, and if so adds it to the sql string. WIth a case select which detrmines if the date says January then the date will be #01/2003# etc, of course the year will be dynamic, taken from the list box also.
Is this the best way of doing this? if so how do i code it so it determines whats selected in the list box and puts the info into an sql string.
Or if there are other eaiser ways please let me know.
Thanks in advance, Elliot.
I have a list box, lstMonthYear. It takes data from tblPurchaseInvoice, groups Date, and formats the date and fills the list box, eg,
List box shows:
January 2003
March 2003
June 2003
November 2003
etc etc...
Im trying to do some VB code, that takes the selected contents of the list box (multiple selection is on), and creates an sql string, the sql string will do various things, but once i have the basics i should be able to code it on my own.
I was looking at a loop that goes down the list box, determins if the date is selected, and if so adds it to the sql string. WIth a case select which detrmines if the date says January then the date will be #01/2003# etc, of course the year will be dynamic, taken from the list box also.
Is this the best way of doing this? if so how do i code it so it determines whats selected in the list box and puts the info into an sql string.
Or if there are other eaiser ways please let me know.
Thanks in advance, Elliot.