Results 1 to 4 of 4
  1. #1
    adi2011 is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    19

    Loop through a Table/Query and return the one or more values Loop through a Table...

    Hello,

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

    http://img96.imageshack.us/img96/268...1220142554.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

    http://img818.imageshack.us/img818/1...1220140354.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

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,724
    Just typing while reading :

    After Update of Combo (you have selected the CustomerNo)
    How about opening the subform with a recordsource such as (pseudo code only)

    " Select InvoiceNo from invoiceTable where customerNo = " & yourmainform. yourcombo

  3. #3
    adi2011 is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    19
    Hello,

    Thank you very much for suggestion!

    However, I have solved situation with this code

    http://www.utteraccess.com/forum/Loo...-t2001226.html

    Thank you!
    Adi

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,724
    Which is similar.
    Thanks for posting your solution.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. create table using something like loop query
    By learning_graccess in forum Queries
    Replies: 20
    Last Post: 04-18-2012, 09:52 AM
  2. Loop until last record in excel table
    By compooper in forum Programming
    Replies: 5
    Last Post: 06-30-2011, 02:14 PM
  3. How to loop code to run through entire table
    By kmajors in forum Reports
    Replies: 9
    Last Post: 04-23-2010, 09:27 AM
  4. update table in loop based on IF statement
    By LALouw in forum Access
    Replies: 0
    Last Post: 07-26-2009, 08:46 PM
  5. Loop a table to use field in query
    By jdubp in forum Programming
    Replies: 0
    Last Post: 03-04-2008, 11:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums