Formating Issue in a Query

  • Thread starter Thread starter Midland
  • Start date Start date
M

Midland

I am running a query and have several calculated columns. One of them is a
simple summing of values on the record:

QRateID: [PN]+[Seq]/1000

The others are drawing from another table, the first being:

QRateNum: DLookUp("RateNum","datalink","[RateID]=" & [QrateID])

The first calculated expression has the same options for properties as the
other fields in the query: Description, Format, Decimal Places, etc., with
the usual options for Formating.

The second, no matter how I build it, has no line for "Decimal Places" and
the "Format" property offers no options. Literally, the drop-down box is
empty.

Why is this happening? The dlookup is pulling text from some columns,
numbers from others. One of the fields is three decimal places in the
original table, but is seven in the query. Literally, it isn't formatted at
all.
 
You need to check your math on the first one.
Maybe this --
QRateID: ([PN]+[Seq])/1000

Or this --
QRateID: [PN]+([Seq]/1000)

Wrap the second one in format like this --
QRateNum: Format(DLookUp("RateNum","datalink","[RateID]=" & [QrateID]),
"Xyyy Yzzz")
 
Back
Top