benpaul Posted January 2, 2009 Posted January 2, 2009 Hi All, Sorry, I have checked as many forums as I can and also googled etc, but to be honest I dont really know what im looking for! My problem is this... I have an application, when it first starts it displays a windows form that has a combobox populated with a list of 'events' that the user has created... this is working correctly... the user selects the 'event' that they want to administrate and this sets a variable that is available throughout the app (the EVENT ID). now... when they click the 'select' button, it closes this first form (after setting my eventID variable) and then displays another form that I will use to display a listbox of all the records in an SQL COMPACT database table that has an 'eventid' that matches the one we set from the first forums COMBOBOX. Anyways... what I effectivly want to do is populate a listbox using an SQL SELECT query a little like the one below... string SqlQuery = "SELECT * FROM receipts WHERE eventid="+eventID; I am sorry if this seems like a very mundane question, I just cant find the answer anywhere... any help would be much appreciated. Quote
Administrators PlausiblyDamp Posted January 3, 2009 Administrators Posted January 3, 2009 Which bit are you having problems with? Populating a listbox or launching the second form and passing the selected event to it? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.