Copy a txtbox and details from one form to another

G

Guest

Hi all,
I have a form Called Customers Machines which has a cboCompany control and I
select a company name from the list and all other txtBoxes display the
relevant details by matching the companyID, this form also contains a subform
that displays the Machines that the company owns, the form also conrtains a
button (Details) next to each machine that opens another form called Job Cad
no problems there! When I select a machine and click on the details button to
open the form called Job Card all the customers details, and the machines
details must be displayed. I copied the relevant controls from the main form
and the sub form and pasted them in to the Job Card Form, I then changed the
control source to return the details from each of the forms, again I have no
problems with this in general. My problem is that in the Job Card form the
information displayed in the control that returns the company name is
displaying the CompanyID, I need it to display the company name as it does in
the Customer Machines form.
Any help would be greatly appreciated
 
W

Wayne Morgan

The value of a combo box is frequently not what you see displayed. The value
comes from the Bound Column, which in this case is the column that holds the
ID. This is normal, but will result in what you're seeing if you try to
refer to the value of the combo box. What you need is the data in a
different column. To get that, you need to use the Column property of the
combo box. The Column index is zero based, so 0 is the first column, 1 the
second, etc.

Example:
=Forms!Form1!MyCombo.Column(1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top