Last post Aug 13, 2013 06:48 AM by Terry Guo - MSFT
Aug 08, 2013 03:33 AM|bdcm26|LINK
Hi... Just a newbie here..
The problem is.. I have 2 tables, "Students" & "Violation"...
Under "Violations" table, I have the following fields:
Under "Students" table, I have the following fields:
My question is, could it be possible, that when inserting in "Violations" table, all i have to do is input the StudID and the rest just like Last_Name, First_Name, etc will be automatically displayed?
Many thanks in advanced...
Aug 08, 2013 04:47 AM|oned_gk|LINK
Aug 09, 2013 12:49 PM|bdcm26|LINK
Thanks for the reply..
Can you give a code sample?
Will it get the names from the "Students" table automatically? So that I won't have to input them during insertion?
Isn't it turning the textbox's visibility just hide it? What am i trying to do is that, during insertion, when I input the StudID that comes from the "Violations" table, it will automatically detect the name of that particular student that comes from the
"Students" table, and display its name in the corresponding textbox, so that I won't have to input them.. Just to minimize typing..
Thanks.. Hope someone gets my point...
Aug 09, 2013 01:12 PM|oned_gk|LINK
Aug 10, 2013 07:54 AM|bdcm26|LINK
Thanks.. Gonna try it later... I'll inform you if that solves my problem... Thanks...
Aug 10, 2013 10:29 AM|bdcm26|LINK
So this is what I am trying to accomplish.. During insertion, after typing the StudID, the user will have to click the Check button, to verify if that StudID exists. If it exists, it will then display the Full Name, Level, & Section of that particular student.
And if not, an error message will be displayed. LastName down to Section are set to read only.
The user only needs to type the StudID, the rest, from LastName down to Section will be automatically retrieved from the Students table..
Aug 13, 2013 06:48 AM|Terry Guo - MSFT|LINK
According to your description, I think we can try to use join statement to solve it, please try to refer to the following T-SQL statement.the “@studID” will receive user input studID.
from Students s
join Violations v