Hi Guys,
This is my first time here,
Im very new to VB6
I have followed some tutorials on using the data control, data grid etc,
So I have these data Controlls with some text boxes on 1 Form hooked up to my database, i can scroll through the records with the datagrid or the Data control,
I want to be able to choose the record or selected record from these Controls, pass it to another form which will pull records from a query in the database based on matching the passed parimeter's value.
Now I have had a go and it sort of works but not correctly,
I declared a Global variable in my ModMain.bas file "dname"
On my main form I set the value of the variable(dname) as follows:
Private Sub Form_Load()
txtkcname.Refresh
dname = txtkcname.Text
End Sub
with a command button to open up the details form
Private Sub searchButton_Click()
Form1.Show
End Sub
and finaly the Form that opens with the details
Private Sub Form_Load()
Label1.Caption = dname
End Sub
Now it seems to work except the value passed always stays at the very first record in the recordset, is there something i need to do to make the labels caption refresh to the text boxes current value?
Many thanks to anone who can help.
Webstaff
This is my first time here,
Im very new to VB6
I have followed some tutorials on using the data control, data grid etc,
So I have these data Controlls with some text boxes on 1 Form hooked up to my database, i can scroll through the records with the datagrid or the Data control,
I want to be able to choose the record or selected record from these Controls, pass it to another form which will pull records from a query in the database based on matching the passed parimeter's value.
Now I have had a go and it sort of works but not correctly,
I declared a Global variable in my ModMain.bas file "dname"
On my main form I set the value of the variable(dname) as follows:
Private Sub Form_Load()
txtkcname.Refresh
dname = txtkcname.Text
End Sub
with a command button to open up the details form
Private Sub searchButton_Click()
Form1.Show
End Sub
and finaly the Form that opens with the details
Private Sub Form_Load()
Label1.Caption = dname
End Sub
Now it seems to work except the value passed always stays at the very first record in the recordset, is there something i need to do to make the labels caption refresh to the text boxes current value?
Many thanks to anone who can help.
Webstaff