Results 1 to 8 of 8
  1. #1
    Stephenson is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Location
    North West
    Posts
    110

    Dlookup returning circular reference warning in control source

    Hello all,



    I'm working on my first report and am trying to get my textbox, tboJob to show a field value and not the ID. I have tried the following Dlookup in my control source with no luck.

    Code:
    =DLookUp("[JobName]","Jobs","ID=" & [tboJob])
    JobName is the field I want to show from the table Jobs. I must be missing something simple. Please let me know what it is.

    Thank you for having a look

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    does the report use a table or query for its data? This is where [jobname] should be available. You shouldn't need to lookup the value.

  3. #3
    Stephenson is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Location
    North West
    Posts
    110
    I'm using a table for the data

  4. #4
    Stephenson is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Location
    North West
    Posts
    110
    The table I'm using for the report is EmployeeWorkLog.

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    The circular reference error is due to the fact that you are using the value in tboJob to update itself, which means it would want to update itself again, etc. etc.....

    A solution might be to put the JobID in an invisible report field tboJob, and then set another text field (e.g. tblName) using that value; the Dlookup you have would work.

    Easier would be to use a query which contains the JobName as the report source. This is a common approach when creating a report that uses lookup values, instead of the ID's.

  6. #6
    Stephenson is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Location
    North West
    Posts
    110
    John_G,

    Thank you for the help. I like the sounds of doing the query.

    Please excuse my ignorance, but to do this all I would need to do is create a query from that table then include the fields I wish to use then use that query as my report source? I'm new to queries too.

    Thanks for the help.

  7. #7
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Your query would include the main table plus the lookup table(s). You would join the main tables to the lookup tables using the field common to both (JobID), and then in the query field list include the JobName from the lookup table . And yes, you would use the query as the record source for the report.

  8. #8
    Stephenson is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2015
    Location
    North West
    Posts
    110
    Thank you for the help John_G

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

Similar Threads

  1. Replies: 10
    Last Post: 12-27-2013, 02:54 PM
  2. Replies: 3
    Last Post: 10-07-2013, 12:27 PM
  3. circular reference cause by query
    By mike02 in forum Queries
    Replies: 4
    Last Post: 08-21-2013, 02:01 PM
  4. Circular reference caused by
    By rncarterjm in forum Queries
    Replies: 1
    Last Post: 04-02-2013, 08:59 PM
  5. DLookup in Control Source
    By bgephart in forum Forms
    Replies: 2
    Last Post: 08-28-2012, 02:06 PM

Tags for this Thread

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