Results 1 to 5 of 5
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    Using DLOOKUP with tables only

    In the attached Word document I have a screen shot showing the fields for the "Membership" table and "Class table." I am working exclusively with tables, no forms.



    In the Membership table, I will enter a numeric value in the Class field. In the Tuition field, I want to use a DLOOKUP, which would look to the class column next to it, take that value as a lookup number, then go to the Class table (second screen shot) and locate that lookup number in the ClassID field, find the corresponding value in the Tuition column, then drop that result in the tuition field of the membership table.

    Example:

    In the Membership table, I enter 7 in the Class field. The tuition field should automatically return $160, because in the Class table, the classID 7 corresponds to a price of $160.

    I tried setting up the Tuition field in the membership table as a calculated field, then I entered a DLOOKUP in the expression box and received an error.

    Is it possible to do this type of Lookup?
    Attached Files Attached Files
    Last edited by Access_Novice; 11-27-2013 at 08:56 PM. Reason: I forgot to include the attached file.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I can honestly say I have never tried that before.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I am working exclusively with tables, no forms.
    This is a VERY bad practice.

    Even if the dB is only for you, you should ALWAYS use forms to interact with data.

    IMO, using calculated fields is also a bad practice. I never use calculated fields.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Can't use functions in Calculated type field in table anyway. Use query as basis for forms and reports.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265
    Quote Originally Posted by ItsMe View Post
    I can honestly say I have never tried that before.
    Thank for your input sir.

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

Similar Threads

  1. Replies: 4
    Last Post: 11-22-2013, 11:20 AM
  2. Use DLookup to get data from multiple tables
    By medady in forum Programming
    Replies: 4
    Last Post: 02-19-2013, 01:38 PM
  3. Replies: 4
    Last Post: 08-13-2012, 04:39 PM
  4. DLOOKUP two tables in query
    By sockswithsandals in forum Queries
    Replies: 3
    Last Post: 04-17-2012, 06:55 AM
  5. DLookUp Query across multiple tables
    By karldou in forum Queries
    Replies: 2
    Last Post: 12-19-2011, 02:26 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