Dennis
Jun 7th, 2000, 01:08 PM
I am building an application w/VB 6.0 and I am using SQL 7.0 Having some trouble with bringing up a form titled AltAddress with a ID# that matches with the form StudentsInfo ID#. Can do it in Access 97/2000 but I can't seem to make it work in this VB App. AltAddress form comes up when the button is clicked on the StudentsInfo form but the ID# numbers do not match and the SELECT (other fields do not match either) Anyway if you can help it would be wonderful.
This is what I been trying
Private Sub cmdAltAddress_Click()
' This code created in part by Command Button Wizard.
'On Error GoTo Err_cmdAltAddress_Click
' Open form frmAltAddress in data edit mode.
Load frmAltAddress
'Set recordsource to StudnetID
frmAltAddress.sqlaltaddress.RecordSource = "SELECT * FROM tblAltAddress INNER JOIN tblStudentsInfo ON tblAltAddress.StudentID = tblStudentsInfo.StudentID"
' Set StudentID in control box on form AltAddress to value in
' control on frmStudentsInfo.
[frmAltAddress]!StudentID = [frmStudentsInfo]!StudentID
frmAltAddress.Show
End Sub
This is what I been trying
Private Sub cmdAltAddress_Click()
' This code created in part by Command Button Wizard.
'On Error GoTo Err_cmdAltAddress_Click
' Open form frmAltAddress in data edit mode.
Load frmAltAddress
'Set recordsource to StudnetID
frmAltAddress.sqlaltaddress.RecordSource = "SELECT * FROM tblAltAddress INNER JOIN tblStudentsInfo ON tblAltAddress.StudentID = tblStudentsInfo.StudentID"
' Set StudentID in control box on form AltAddress to value in
' control on frmStudentsInfo.
[frmAltAddress]!StudentID = [frmStudentsInfo]!StudentID
frmAltAddress.Show
End Sub