Results 1 to 5 of 5
  1. #1
    TonyB is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Oxfordshire, UK
    Posts
    16

    Calling tables within a calculated field

    Hi,

    I'm sure this is really simple, but it's just not working for me. To call data from within a form, I can use [forms]![form_name]![field_name] in the control source.
    However, if I try the same format with table data (i.e. [tables]![table_name]![field_name]) then it doesn't work as Access can't find the table.



    All I want to do in my report is replace a checkbox with a text field that says "Yes" if the table the box is checked and "No" if it's unchecked:

    =IIf([table]![tblReqLogs]![Completed]="-1","Yes","No")


    Thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    In Access in order to look at tables you need to use either a Recordset or a Domain function (DLookup...)

  3. #3
    TonyB is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Oxfordshire, UK
    Posts
    16
    Is that used in Access SQL queries? I thought DLookup was VBA?

  4. #4
    TonyB is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Oxfordshire, UK
    Posts
    16
    (ignore my last post)

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    BTW, a Checkbox field is either 0 (false) or -1 (true). It is a numerical value not a string value ("-1") Actually technically a Checkbox field could also be Null.

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

Similar Threads

  1. Calculated Fields in tables
    By dharsh in forum Misc
    Replies: 12
    Last Post: 07-01-2013, 03:07 PM
  2. Calculated field, data from multiple tables
    By Suzie2012 in forum Programming
    Replies: 7
    Last Post: 06-12-2012, 01:15 PM
  3. Replies: 6
    Last Post: 03-09-2012, 01:07 PM
  4. Calculated fields across tables and forms
    By drrob1983 in forum Queries
    Replies: 4
    Last Post: 09-15-2011, 09:41 AM
  5. Replies: 6
    Last Post: 06-08-2011, 05:00 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