|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i m trying to verify the ID number from two different table, which are staff(ID= SfID) and Lecturer(ID=LID). What is the proper way to write the statement?
Here is my coding: sqlBorrow = "select * from Staff,Lecturer where SfID like'" & Trim(txtMID.Text) & "%" And LID Like " & Trim(txtMID.Text) & " '" Set rsBorrow = New ADODB.Recordset rsBorrow.Open sqlBorrow, db On Error GoTo msg lblDisplayName.Caption = rsBorrow.Fields(1) hope anyone could help me! it is urgent!! Thanks in advanced. Regards Shanny |
|
#2
|
||||
|
||||
|
It could be your SQL statement. You have to either JOIN the two tables (staff and lecturer) or use the UNION command (provided the tables have the same structure).
That might help. Let me know! |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Compile error...urgently!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|