Results 1 to 4 of 4
  1. #1
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64

    Conditional calculated field.

    Hi all!
    I am trying to build a query with a calculated field. The fields involved look something like this:

    Code:
    Ticket    Price    TransLink    Calculate:
    701910043            
    701910249    81.74        
    701910286    81.137        
    701910451    1.00392        
    701910486    1        
    701914131    0.97686        
    701914543    0.9706        
    701922763    1.00372        
    702002522            
    702002523            
    702002521            
    702002520            
    702008654    1.00304        
    702116307    0.98146        
    702116373    82.02        
    702130962    1.00179        
    702132472    63.189        
    702132502    62.043        
    702137835    1.00092        
    702196105    1.33332        
    702196801    1.33461        
    702197288    81.355        
    702201320    1.33317        
    702201487    1.33041        
    702201976    1.00544    701910451    
    702201977    1.00544    701922763    
    702201978    1.00544    702008654    
    702201979    1.00544    702130962    
    702201980    1.00544    702137835    
    702202114    1    701910486
    What I need is to loop through the [TransLink] filed until i find a value that matches the current [ticket] field. once the matching value is found, the [calculate] filed would receive the price value corresponding to the matched [TransLink] value.


    I tried to accomplish this with some of the built in functions with no luck. I may need to use VBA to do what I need, but its a bit too complicated for me. Any help or suggestions would be appreciated.
    Last edited by ser01; 01-03-2011 at 02:14 PM.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe this link will help: http://allenbrowne.com/ser-06.html

  3. #3
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64

    Thank you!!!

    Quote Originally Posted by RuralGuy View Post
    Maybe this link will help: http://allenbrowne.com/ser-06.html
    Exactly what i needed and way simpler than i would have thought. Thank you!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    We try to please!

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

Similar Threads

  1. Very Slow Calculated Field
    By SteveW in forum Access
    Replies: 4
    Last Post: 11-21-2010, 09:50 AM
  2. calculated field from calculated field?
    By RedGoneWILD in forum Reports
    Replies: 5
    Last Post: 08-03-2010, 02:32 PM
  3. Calculated field
    By nashr1928 in forum Forms
    Replies: 9
    Last Post: 08-01-2010, 01:59 PM
  4. Calculated field
    By nashr1928 in forum Forms
    Replies: 3
    Last Post: 07-22-2010, 05:10 AM
  5. Formatting a Calculated Field
    By e_lady333 in forum Queries
    Replies: 0
    Last Post: 03-17-2010, 06:11 PM

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