Populate TextBox using ListBoxe from another form

npatil

Registered User.
Local time
Today, 20:32
Joined
Mar 4, 2011
Messages
39
Hello,
I am using a ListBox(Combo12) which contains values of ETO from a query[ID-ETO].
I have selected the ETO field from the table
  • to populate my ListBox.
    The combo12 is on form named [MainForm].
    Now, I have another form [Form_1] which has several textboxes including the ETO, etc. all of which are contained in a table
    • .
      So How do I use a button on MainFrom to select a particular ETO to open Form_1 to populate different textboxes?
      Can someone tell me which events in the property sheet of the corresponding forms, buttons and combo boxes need to be used to trigger this event. I am really confused here and have been stuck ...

      Thanks in advance,
      Nikhil
 
Thanks mate. I think this should help! I'll get back to you if needed..
 
Hello,

I got the code working almost immediately after checking out the links. Thanks!

Now, I was wondering if its possible to select various fields from a table based on just one of the fields. case in point, after I have selected my ETO from a listbox, I would like to populate a lot of textboxes in another form. The data for these textboxes is listed in the Table List.

Is it possible to simply use a Query to do this? What would you suggest? Also, I would need to make use of the primary key in the List table right, to reference it to the selected ETO from the Listbox ?

Thanks,

Nikhil
 
Now, I was wondering if its possible to select various fields from a table based on just one of the fields. case in point, after I have selected my ETO from a listbox, I would like to populate a lot of textboxes in another form. The data for these textboxes is listed in the Table List.
Why would you even want to do this? Why can't you have the listbox on the form you would like to filter?

To filter a form look into these properties, Filter and FilterOn. E.g.
Code:
Me.Filter = "[ID] = " & Me.IDtextboxName
Me.FilterOn = True
 
Hello,

I could not understand how to use the filter. I tried the following alternative...but it worked partially...
Private Sub Open_Click() \\ I am using a button control to select ETO no. and fill other fields in the form...
Dim etoselect As Variant
' Set variable etoselect to the current record
etoselect = Me.lstETO.Column(0)
'Select record
Forms!MainForm.Text120.Value = etoselect
Forms!MainForm.Text116.Value = Me.lstETO.Column(2) End
End Sub

// Here Column 2 is for Field2. However. my Text116 is not getting updated by Column 2 value from the listbox. Only Column(0) and Column(1) are working. There are more than 100 fields and still I am able to access values from only the first two columns...

I also tried playing with the "Bound Column" Value in the Data Tab for the lstETO, but it did not work.

Can you tell me where I am going wrong...


Can I have your email id? I can possible send screenshots to better convey my problem..


Thank you,
 
Are the 100 fields visible? If you have 100 fields then it would indicate that your tables are not normalized. You will benefit from reading up on that subject.

What is the value of the Column Count property of the listbox? Look in the Property Sheet.
 
Well, the column count was set to 1. Now when I changed the value to say 5, I am able to display Column(0) through Column(5). So I got t the point. As for normalizing the table, I will look into it.
Is there any way to show only 1 out of 100 fields in the listbox ? Thanks!
 
Ok. I have found a crude solution by just displaying the ET no, as the first Field in the Query. So I am okay with that. Thanks!
 
Ahh,,,why didn't I think of that..Thanks again..
 
Hello Sir,

I need to filter some data from a huge table having many fields records. Since I am using it for an engineering application, I need to build categories or clusters of tyres which have similar properties over a wide range of Fields, but differ only in one or so.

What would be the best way to sift through large amount of data and use access to build cluster functionality ? Can you give me an example or an online reference you might know of?

Best,

Nikhil
 
Since this question isn't related to your original post I would advise that you create a new thread.

Clusters are better handled in a Server architecture so you might want to explain what you mean by a cluster in your new thread.

Good luck!
 
No problem. I just posted a new one with more details. Thanks!
 

Users who are viewing this thread

Back
Top Bottom