Form to search table help please

M0E-lnx

Registered User.
Local time
Today, 01:26
Joined
Sep 3, 2008
Messages
62
Form to search table help please - updated

I've created this form th at has a combobox. This combobox is populated from a table that only has 2 fields, Key and Category.

I've also got a listbox right below it. This listbox is to be populated from another table called PartsList with the results of a search based on the category selected from the combobox above it.

It kind of works, but my problem now is that when I change the value on the combobox, the values on the listbox do not change.

Here is the links to the files (split database)
any help is appreciated

http://www.uploading.com/files/0OM5RBHT/db1_be.mdb.html
http://www.filefactory.com/file/c99d08/n/db1_mdb

Thanks
 
Last edited:
I should probabbly add, that I want to be able to take the selected value off that listbox (columd 0) and throw it on to another form
 
Re: Form to search table help please -- Updated

I've managed to get the search feature working using a combobox to select the category and a listbox to display the results..

Now the question is... How do I send the selected item back to the form that this originated from?

I'ved tried this
Code:
Forms![PoItemsDetails]![Item] = Listbox.Column(1)
But again, the debugger keeps saying it can't find the form... I'm sure the form is there.
 
The form "PoItemsDetails" would need to be open before you can send any data to it.
Then you would need to refresh or requery the "PoItemsDetails" form.

Tlender
 
The form is open.
This is how the events are happening

I open the FrmPorecords which contains the FrmPoItemsDetails subform.
I've setup a doublic-click event on one of the fields in FrmPoItemsDetails to open up this form. So the form is open, but as soon as I double click on the new form to try to assign a value to the previous forms' [Item] field, it says it can't find it... but I know it's open.


Just cracked it!
It turns out I needed to address the subform all the way from it's parent form and not the subform directly.
so the correct syntax would be
Code:
Forms!FrmPoRecords!PoItemsSubform!Item = Listbox.Column(1)
 
Last edited:
Ah, there's a subform in there(I didn't get chance to check the sample). That makes sense then.

Glad you figured it out.

Tlender
 

Users who are viewing this thread

Back
Top Bottom