Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Binding textboxes to source not part of form query


Message #1 by Barry Martin Dancis <bdancis@c...> on Mon, 25 Feb 2002 11:56:45 -0500
Hi --

    I have a form which is bound to a query against the EmployeeEvaluation

table. The query contains the id of the employee but not the employee's name

which resides in the employees table. I can display the employee's name by

adding a combo box with



    Control Source = Employee_Id



and



    Row Source = SELECT DISTINCTROW

                                Employees.Id,

                                Employees.Last_Name

                                FROM Employees



and



    Bound Column = 1



Since the employee is not  a variable or selectable field in the form, I

would like to display the name in a textbox but I don't see how to bind a

text box to source other than the query that created the form.



    Is there some way to use the expression builder for the text box or do I

have to create a subform to display the name



Thanks,



Barry



Message #2 by "John Ruff" <papparuff@c...> on Mon, 25 Feb 2002 10:50:56 -0800
This is a multi-part message in MIME format.



------=_NextPart_000_0067_01C1BDEA.4DE429C0

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Yes you can



Your combobox has 2 columns in it Column(0) = Employees.Id, Column(1) -

Employees.Last_Name



So to get the last name from the combobox into a text box you can place

the following in the Control Source of the text box:



= yourcomboboxname.column(1)









John Ruff - The Eternal Optimist J



Always looking for Contract Opportunities



 



9306 Farwest Dr SW



Lakewood, WA 98498



papparuff@c...







-----Original Message-----

From: Barry Martin Dancis [mailto:bdancis@c...]

Sent: Monday, February 25, 2002 8:57 AM

To: Access

Subject: [access] Binding textboxes to source not part of form query





Hi --

    I have a form which is bound to a query against the

EmployeeEvaluation table. The query contains the id of the employee but

not the employee's name which resides in the employees table. I can

display the employee's name by adding a combo box with



    Control Source = Employee_Id



and



    Row Source = SELECT DISTINCTROW

                                Employees.Id,

                                Employees.Last_Name

                                FROM Employees



and



    Bound Column = 1



Since the employee is not  a variable or selectable field in the form, I

would like to display the name in a textbox but I don't see how to bind

a text box to source other than the query that created the form.



    Is there some way to use the expression builder for the text box or

do I have to create a subform to display the name



Thanks,



Barry

















Message #3 by Barry Martin Dancis <bdancis@c...> on Mon, 25 Feb 2002 15:06:31 -0500
This is a multi-part message in MIME format.



--Boundary_(ID_XTFnuwGVnQp3ATz4HrTntQ)

Content-type: text/plain; charset=iso-8859-1

Content-transfer-encoding: 7BIT



MessageJohn,

    What I meant was that I would like to replace the combo box with a textbox so that Employees.Last_Name is not available on the
form except from the text box.



Thanks,



Barry

  ----- Original Message ----- 

  From: John Ruff 

  To: Access 

  Sent: Monday, February 25, 2002 1:50 PM

  Subject: [access] RE: Binding textboxes to source not part of form query





  Yes you can



  Your combobox has 2 columns in it Column(0) = Employees.Id, Column(1) - Employees.Last_Name



  So to get the last name from the combobox into a text box you can place the following in the Control Source of the text box:



  = yourcomboboxname.column(1)









  John Ruff - The Eternal Optimist J



  Always looking for Contract Opportunities



   



  9306 Farwest Dr SW



  Lakewood, WA 98498



  papparuff@c...







  -----Original Message-----

  From: Barry Martin Dancis [mailto:bdancis@c...]

  Sent: Monday, February 25, 2002 8:57 AM

  To: Access

  Subject: [access] Binding textboxes to source not part of form query





  Hi --

      I have a form which is bound to a query against the EmployeeEvaluation table. The query contains the id of the employee but
not the employee's name which resides in the employees table. I can display the employee's name by adding a combo box with



      Control Source = Employee_Id



  and



      Row Source = SELECT DISTINCTROW

                                  Employees.Id,

                                  Employees.Last_Name

                                  FROM Employees



  and



      Bound Column = 1



  Since the employee is not  a variable or selectable field in the form, I would like to display the name in a textbox but I don't
see how to bind a text box to source other than the query that created the form.



      Is there some way to use the expression builder for the text box or do I have to create a subform to display the name



  Thanks,



  Barry


















Message #4 by "John Ruff" <papparuff@c...> on Mon, 25 Feb 2002 16:14:52 -0800
This is a multi-part message in MIME format.



------=_NextPart_000_000B_01C1BE17.8F032DC0

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Ok,



Why can't you add the employees table to the forms's query linking the

EmployeeID to both tables.  You can then add the employee name to the

QBE and consequently add the employee name to the form.







John Ruff - The Eternal Optimist J



Always looking for Contract Opportunities



 



9306 Farwest Dr SW



Lakewood, WA 98498



papparuff@c...









-----Original Message-----

From: Barry Martin Dancis [mailto:bdancis@c...]

Sent: Monday, February 25, 2002 8:57 AM

To: Access

Subject: [access] Binding textboxes to source not part of form query





Hi --

    I have a form which is bound to a query against the

EmployeeEvaluation table. The query contains the id of the employee but

not the employee's name which resides in the employees table. I can

display the employee's name by adding a combo box with



    Control Source = Employee_Id



and



    Row Source = SELECT DISTINCTROW

                                Employees.Id,

                                Employees.Last_Name

                                FROM Employees



and



    Bound Column = 1



Since the employee is not  a variable or selectable field in the form, I

would like to display the name in a textbox but I don't see how to bind

a text box to source other than the query that created the form.



    Is there some way to use the expression builder for the text box or

do I have to create a subform to display the name



Thanks,



Barry

















Message #5 by Barry Martin Dancis <bdancis@c...> on Tue, 26 Feb 2002 01:18:27 -0500
This is a multi-part message in MIME format.



--Boundary_(ID_7Y1tjRNqBWQIa8jU5QSlyw)

Content-type: text/plain; charset=iso-8859-1

Content-transfer-encoding: 7BIT



MessageJohn,

    I could but I have other dictionaries that need to be linked as well and it makes the query more complicated than I would like.
What I have done instead is create a subform for each dictionary which displays the data and then used parent-child linking to
display the name found in the dictionary instead of the id found in the parent form. This solution doesn't have as much flexibility
for displaying the dictionary names as the solution you suggested but I don't need a lot of flexibility at the moment. What it does
do is ensure that dictionary names are displayed uniformly across all forms.



Barry

  ----- Original Message ----- 

  From: John Ruff 

  To: Access 

  Sent: Monday, February 25, 2002 7:14 PM

  Subject: [access] RE: Binding textboxes to source not part of form query





  Ok,



  Why can't you add the employees table to the forms's query linking the EmployeeID to both tables.  You can then add the employee
name to the QBE and consequently add the employee name to the form.







  John Ruff - The Eternal Optimist J



  Always looking for Contract Opportunities



   



  9306 Farwest Dr SW



  Lakewood, WA 98498



  papparuff@c...









  -----Original Message-----

  From: Barry Martin Dancis [mailto:bdancis@c...]

  Sent: Monday, February 25, 2002 8:57 AM

  To: Access

  Subject: [access] Binding textboxes to source not part of form query





  Hi --

      I have a form which is bound to a query against the EmployeeEvaluation table. The query contains the id of the employee but
not the employee's name which resides in the employees table. I can display the employee's name by adding a combo box with



      Control Source = Employee_Id



  and



      Row Source = SELECT DISTINCTROW

                                  Employees.Id,

                                  Employees.Last_Name

                                  FROM Employees



  and



      Bound Column = 1



  Since the employee is not  a variable or selectable field in the form, I would like to display the name in a textbox but I don't
see how to bind a text box to source other than the query that created the form.



      Is there some way to use the expression builder for the text box or do I have to create a subform to display the name



  Thanks,



  Barry



















  Return to Index