Sorry to call on you again, I've have a form that will sign in users from my access database. But the forms only recognise the users input in order to sign them in. Further on I'm adding more detail to the students data. But I don't know how to get the data from the text box on the sign in page over to where more data is added in order for this data to be put in the same row in my table. I hope that makes sense, any advice would be great.
Thanks
K
Javeed M ShaikhPosted Apr 17, 2013, 1:25 PM
Katie BPosted Apr 17, 2013, 1:05 PM
Riddhi ValechaPosted Apr 17, 2013, 8:12 AM
Can you share your code ?? I can debug and send it back....
VulpesPosted Apr 17, 2013, 5:49 AM
"WHERE ID = " + txtstudentid.Text;
Katie BPosted Apr 17, 2013, 5:36 AM
VulpesPosted Apr 17, 2013, 4:58 AM
Katie BPosted Apr 17, 2013, 4:39 AM
thankyou, I noticed once I out the two lines together. I never thought of using an update statement. The module code and things in square brackets need adding to the table. I'd guess if I put an update statement directly underneath this then the insertion of the modules will relate to the update statement, if that makes any sense.....
VulpesPosted Apr 17, 2013, 4:32 AM
Katie BPosted Apr 17, 2013, 3:26 AM
Javeed M ShaikhPosted Apr 16, 2013, 7:34 PM
"INSERT INTO StudentDetails ([ModuleCode],[Modules],[Classes]) WHERE ID = '" + txtstudentid.Text + "' VALUES ('" + lstModCode.SelectedItem + "','" + lstboxModules.SelectedItem + "','" + lstboxClasses.SelectedItem + "')";
Katie BPosted Apr 16, 2013, 6:05 PM
"INSERT INTO StudentDetails ([ModuleCode],[Modules],[Classes],) WHERE ID = '" + txtstudentid.Text + "'" +
"VALUES ('" + lstModCode.SelectedItem + "','" + lstboxModules.SelectedItem + "','" + lstboxClasses.SelectedItem + "')";
But each time I run it I get an "Syntax error on INSERT INTO statement. I tried swapping out comma, semi-colons etc but I cant see it's issue. I'm hoping to get the statement to add the modulecode etc to my database where the txt.studentidfield is equal to the id in my database.
Any help would be great. Thank you
Katie BPosted Apr 16, 2013, 5:29 PM
Javeed M ShaikhPosted Apr 16, 2013, 5:25 PM
your sign in form
' this code will be on click of the login button
your second form