Refer to Numeric value instead of Literal

B

bw

The following SQL comes from my cboFromAirport control.

SELECT qryAirports.AirportID, qryAirports.AC, qryAirports.Airport,
qryAirports.AirportCode, qryAirports.TimeZone
FROM qryAirports
ORDER BY qryAirports.AC;

The value of qryAirports.TimeZone comes from a Lookup Table.

In my form, I have the following code:
If Forms!MakeTravelRequest!cboFromAirport.Column(4) = "Pacific" Then
DTimeFactor = 1
' This works okay, but doesn't seem right to me, as I'd prefer to see the
numerice value instead of a literal.

How do I refer to the numeric value of Column(4)...(the TimeZone).

Thanks,
Bernie
 
S

Steve Schapel

Bernie,

Do you mean that each TimeZone has an associated numerical value, based
on the entries in "a Lookup Table"? And do you mean that the data in
the TimeZone field in the qryAirports query contains the text
description of the time zone? But you want the literal number for the
time zone instead? If so, it seems to me that you need to include the
"a Lookup Table" in the qryAirports query, joined on the existing
TimeZone field, so you can directly include the TimeZoneNumber (or
whatever it's called) from the Lookup Table into the query data set.
Then, when you refer to it on your form using the Column property of the
combobox, you will get the number returned.
 
Top