Access Queries

  • Thread starter Thread starter lisa
  • Start date Start date
L

lisa

When creating a query, how can I get Access to reveal to
actual information in that field rather than the ID
number for the field, (ex: 1=hope) I want it to reveal
hope and not 1 in my query. Also how do I get it to sort
by year rather than by month. I have my date set at
01/15/2003 and when I tell it to sort by date, it pulls
the month and not the year.

Thanks for any assistance.
 
A1. Lookup value
You should already have a lookup table containing the values such as 1,
"hope", with a relationship to the existing table. If so, include the lookup
table in your query. This lets you choose the column from the lookup table
that contains the text values rather than the numbers.

If some records in your table don't have a value in this field, double-click
the join-line between the 2 tables in query design view, and choose the
option that gives you all values from your main table.

A2 Sort by date
Access should sort these by date. If it is sorting by month, it thinks the
data is text instead of date. Wrap the field in CVDate() so Access
understands the data type. The Field row in your query will look like this:
MyDate: CVDate([WhatEverYourFieldIsCalled])
 
Back
Top