morlassino
IS-IT--Management
i have maybe a simple question please forgive my stupidity in advance. I am new to VB and i have programmed in VFP but i need to switch to VB. anyway i have two tables on SQL Server one is the parent and othe ris a details my question is that i would like to use a datacombo box to choose a date from the parent to open a datagrid box with the records that only match the date i selected in the datacombo box. i have attempted with failure here is the code i used
MARIO P ORLASSINO
ASSISTANT MANAGER IT
"THE HOSE HEAD"
Code:
Private Sub DataCombo1_Change()
pstrselect.Open = "SELECT date from brkdetails WHERE date = '" & DataCombo1.Text & "'"
pstrsql = pstrselect
Adodc1.RecordSource = pstrsql
Set DataGrid1.DataSource = pstrsql
Adodc1.Refresh
End Sub>
MARIO P ORLASSINO
ASSISTANT MANAGER IT
"THE HOSE HEAD"