Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5971997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:35:45+00:00 2026-05-22T20:35:45+00:00

i need to create a lookup table in Access, where all the abbreviations are

  • 0

i need to create a lookup table in Access, where all the abbreviations are related to a value, and if the abbreviation (in the main table) is null, then i want to show “Unknown”

i got the values working, but i can’t seem to get the nulls to show up.

my lookup table looks like this:

REQUEST     REQUEST_TEXT
------------------------
A           Approve
D           Disapprove
NULL        N/A

but when i do a count by request, it only shows me values for A and D, all though i know there are some blanks in there as well.

what am i doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:35:45+00:00Added an answer on May 22, 2026 at 8:35 pm

    This should be easier if you change tblLookup.

    REQUEST     REQUEST_TEXT
    ------------------------
    A           Approve
    D           Disapprove
    U           Unknown
    

    Then, in tblMain, change the REQUEST field to Required = True and Default Value = “U”. When new records are added, they will have U for REQUEST unless the user changes it to A or D.

    Then a query which JOINs the 2 tables on REQUEST should get you what I think you want.

    SELECT m.REQUEST, l.REQUEST_TEXT
    FROM tblMain AS m
        INNER JOIN tblLookup AS l
        ON l.REQUEST = m.REQUEST;
    

    You should also create a relationship between the 2 tables, and select the option to enforce referential integrity in order to prevent the users from adding a spurious value such as “X” for REQUEST.

    Edit:
    If changing tblMain structure is off the table, and if you’re doing this from within an Access session, you can use the Nz() function on a LEFT JOIN.

    SELECT m.REQUEST, Nz(l.REQUEST_TEXT, "Unknown")
    FROM tblMain AS m
        LEFT JOIN tblLookup AS l
        ON l.REQUEST = m.REQUEST;
    

    If you’re doing this from outside an Access session, like from ASP, the Nz() function will not be available. So you can substitute an IIf() expression for Nz().

    SELECT m.REQUEST, IIf(l.REQUEST_TEXT Is Null, "Unknown", l.REQUEST_TEXT)
    FROM tblMain AS m
        LEFT JOIN tblLookup AS l
        ON l.REQUEST = m.REQUEST;
    

    Edit2: You can’t directly JOIN with Null values. However with the “Unknown” row I suggested for tblLookup, you could use a JOIN which includes Nz for tblMain.REQUEST

    SELECT m.id, m.request, l.request_text
    FROM tblMain AS m
        INNER JOIN tblLookup AS l
        ON Nz(m.request,"U") = l.request;
    

    If you want to leave tblLookup REQUEST as Null for REQUEST_TEXT = Unknown, I suppose you could use Nz on both sides of the JOIN expression. However, this whole idea of joining Nulls makes me cringe. I would fix the tables instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with Sharepoint 2.0 (WSS2) and need to create a lookup field that
I have created a lookup table in Access to provide the possible values for
I have a SQL lookup table like this: CREATE TABLE Product(Id INT IDENTITY PRIMARY
I need create custom dialog and put JPanel into it. Is it possible?
i need create an email list sending to many emails. what is best solution
I need create clone repository. but I do not know where can I get
I need create a document word with Java. And I ask, how can I
i need create a variable with parent subclass. Example: Parent Class <?php class parentClass
I have dynamically created WrapPanel (_wp) with several Borders. And I need create handler
Need to create a custom DNS name server using C which will check against

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.