Re: Functions with Dlookup?
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Sat, 25 Nov 2006 07:10:17 -0500
That should work. You sure iMonth is the correct value? Is VanID a text
field? (If so, you need quotes around the value).
BTW, Date is a bad choice for a field name: it's a reserved word, and using
reserved words for your own purposes can leads to lots of problems.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"scadav" <anonymous@xxxxxxxxx> wrote in message
news:W6OdnU07ftIgk_XYnZ2dnUVZ_uidnZ2d@xxxxxxxxxxxxxx
Can you use a function within Dlookup? If so, how....
I am trying to extract information from a table, but I want to do it for a
particular month. So I was trying to do the following, but wasn't having
much luck trying to retrieve the month number from a date field. Any help
would be appreciated:
In this example, Date is a Field in the database with the datatype of
Date/Time
sTest = DLookup("[MilesRecordedID]", "VanMiles", "Month([Date]) = " &
iMonth & " AND [VanID] = " & rsVans!VanID)
.
- Follow-Ups:
- Re: Functions with Dlookup?
- From: scadav
- Re: Functions with Dlookup?
- References:
- Functions with Dlookup?
- From: scadav
- Functions with Dlookup?
- Prev by Date: Re: Recurring Database glitch + copyright
- Next by Date: Re: Functions with Dlookup?
- Previous by thread: Functions with Dlookup?
- Next by thread: Re: Functions with Dlookup?
- Index(es):
Relevant Pages
|