Loop through a Table and return the one or more values

adi2011

Registered User.
Local time
Yesterday, 19:58
Joined
May 1, 2011
Messages
60
Hello,

In my access database I have one simple table called "Transactions" like this with example data

20121220142554.jpg


and all that data will be pulled on specific way through one simple form called "Test form". It should all work similar to this

20121220140354.jpg


This is detailed explanation..

When user clicks on combo box CUSTOMER there is After update Event that will contain loop that will search all data in Table "Transactions" and then at the end show that customer "A" has two invoices no. '1' and '3'
In case user chooses customer "B" then subform will show result invoice no. '4' and etc.

Is this possible, what code I should use at After update Event of combo box CUSTOMER?

Any help is appreciated and many thanks in advance for prompt replies!

Cheers;)
Adi
 
With the holidays a few hours away I won't have time to offer much help.

Have you looked at the sample databases on this site?
I seem to remember searching for the subform on that category and evaluating a half dozen examples to get some ideas. That was about three years ago. You might start there. Would bet there are some good ideas you can make your own.

For example: the subform query can reference the main form's value
http://office.microsoft.com/en-us/ac...010066611.aspx
The query for the sub-form might just need to be refreshed on the update of the parent form.
The Parameter can use something like: =Forms!CustomerF!CustomerID
because the value of customer ID would exist.
 
Hello Rx,

Thannk you very much for your reply, it helped a lot.

Please note that I am still searching through database examples in this forum but I still can't find something solid.

Your post helped a lot and I will try to make something on my own based on your suggestions..


In the meantime, if anyone has other suggestions I would be really glad to see them!

Thanks in advance.
Adi
 
Or you can use filter.
 

Users who are viewing this thread

Back
Top Bottom