Results 1 to 3 of 3
  1. #1
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52

    DLookup question

    I have a query that I want to use to create a calculated field involving a date. I have a "CalibrationDate" field, a "Frequency" field which is a number, and a "Period" field which is a lookup field that looks at a table that contains 2 fields "Period1" which contains records like Days, Weeks, Months or Years, and the second field is "PeriodCode" Which contains correlating records such as d, ww, m, or yyyy which are what is used for a date add function.

    If you are still with me, for my calculated field I used

    CodeLookup: DLookUp("[PeriodCode]","tblFrequency",[Period1]=[Period])



    I cannot get this to pull "d" when the record has "Days" for the [Period] field and so on. When I remove the last part of the DLookup (the part that you give the criteria) it shows "yyyy" which is the last record in the table so I know that it is working I just have a problem with my criteria portion. Any help is greatly appreciated!

  2. #2
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52
    I know how to make it look at a control on a form, but what I don't know how to do is make it look at another field in the same record.

  3. #3
    Lockrin is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    52
    Well, I figured it out. I didn't need to do a DLookup at all. I just linked that table to the first table and used the fields that way.

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

Similar Threads

  1. DLookup for Yes/No field
    By Lockrin in forum Access
    Replies: 3
    Last Post: 05-27-2010, 12:03 PM
  2. Need help with dlookup.
    By Keith in forum Database Design
    Replies: 8
    Last Post: 05-24-2010, 06:28 PM
  3. Dlookup??
    By Vikki in forum Access
    Replies: 4
    Last Post: 02-16-2010, 07:59 AM
  4. Dlookup
    By janjan_376 in forum Access
    Replies: 20
    Last Post: 07-07-2009, 07:40 AM
  5. Dlookup question
    By nkenney in forum Forms
    Replies: 3
    Last Post: 07-01-2009, 06:36 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 - Senior Forums