G
Guest
I am trying to run a SQL query and apply the recordset to an unbound textbox.
I am doing this primarily because I want to run multiple queries on one form.
So far I have this down:
Set conn = CurrentProject.Connection
Set rst = New ADODB.Recordset
With rst
Set .ActiveConnection = conn
.Source = "SELECT Client.client_name, Client.street_addr,
Client.city, Client.state, Client.zip, Client.main_phone, People.people_id
FROM Client INNER JOIN People ON Client.client_id = People.client_id WHERE
(((People.people_id)=" & Combo40.Value & "));"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
Set Me.Recordset = rst
rst.Close
How do I, for example, tell Access to display the client_name to
txtClient_name on the form?
Thanks in advance!
I am doing this primarily because I want to run multiple queries on one form.
So far I have this down:
Set conn = CurrentProject.Connection
Set rst = New ADODB.Recordset
With rst
Set .ActiveConnection = conn
.Source = "SELECT Client.client_name, Client.street_addr,
Client.city, Client.state, Client.zip, Client.main_phone, People.people_id
FROM Client INNER JOIN People ON Client.client_id = People.client_id WHERE
(((People.people_id)=" & Combo40.Value & "));"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
Set Me.Recordset = rst
rst.Close
How do I, for example, tell Access to display the client_name to
txtClient_name on the form?
Thanks in advance!