Results 1 to 6 of 6
  1. #1
    Mercadier is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    3

    If ..Then...Else

    As an Access Newbie, i cant seem to get a function? to do the following.


    Two tables, one with a list of constants (Dates and events) and the other with details of events within which a field looks up the constants if the events are equal and adds a declared number of days to present the expected delivery date.
    This is what I mean.

    If Table 1. event=Table 2 .event then Date/Event table 1 +10 What rubbish you say.
    I would prefer code, but my ignorance limits me. Any help would be greatly appreciated.

    Mercadier

  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
    What have you tried so far?

  3. #3
    Mercadier is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    3
    Thanks Rural Guy for your quick response.
    I believe that an If..Then..Else code should work if;
    1. Table 1 has a constant event with a date for that event
    2. Table 2 has a field called event and a field called # of days plus or minus
    I placed an unbound field on the form and have tried to construct the following

    If Table 1.event = Table 2 event (is true) then Table 1 event + days Plus or Minus should give a result.

    Am asking the impossible or am i just to new to know?

  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
    Where are you putting the code? Are you using a DLookup()?

  5. #5
    Mercadier is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    3
    RuralGuy,
    I have put the unbound field on a form based on Table 2.
    No, I have not tried to use Dlookup because I am not sure what it does.
    Regards,
    JG

  6. #6
    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
    You will need to use a Domain Function to retrieve a value from other than the RecordSource of the form.

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

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