Click to See Complete Forum and Search --> : ADO
W.R.Purgason
August 16th, 1999, 10:21 AM
Using a ControlDataBox and DBComboBox on the same form, I can make a selection
but the other fields on the form retain first record information. How can solve
this solution, Where I can select and populate all fields......
W.R.Purgason
August 18th, 1999, 09:50 AM
This will Work---Invisible---W/ 2-DataControls and 1-Text1
Visible----DBComboBox and 18 TextBoxes
--------------------C O D E ----------------------------------------------------
Private Sub dbcmbCompanyName_Change()
Dim MySQL As String
Dim MyName As Integer
Me!Text1.Text = dbcmbCompanyName.BoundText
If Me!Text1.Text <> "" Then
MySQL = "Select * from [CLIENTS] Where"
MySQL = MySQL & "[CompanyName] = " & Chr(34) &
Me!Text1.Text & Chr(34) & ";"
datClients2.RecordSource = MySQL
datClients2.Refresh
datClients2.Recordset.MoveFirst
If datClients2.Recordset!Address <> "" Then
Me!txtAddress.Text = datClients2.Recordset!Address
Else
Me!txtAddress.Text = "No Address on File"
End If
End If
Exit Sub
End Sub
Jan Businger
August 18th, 1999, 11:16 AM
Hi,
W.R.Perguson aks
W.R.Perguson replies?
Jan
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.