Re: DLookup Problem
- From: g.ormesher@xxxxxxxxxxxx
- Date: 25 Aug 2005 04:23:27 -0700
Thanks, that did the trick!
Allen Browne wrote:
> Concatenate the value into the 3rd string in DLookup():
>
> varUP = DLookup("[Max PSI]", "Gauges", "[ind]=" & [varIND])
>
> For further explanation, see:
> Getting a value from a table: DLookup()
> at:
> http://allenbrowne.com/casu-07.html
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> <g.ormesher@xxxxxxxxxxxx> wrote in message
> news:1124957229.853191.251030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >
> > Hi, my primary key is a field called "ind"
> >
> >
> > 'Code
> >
> > Dim varUP as Varient
> > Dim varIND as Interger
> >
> > varIND = Me.ind ' this sets varIND to the index value
> >
> > varUP = DLookup("[Max PSI]", "Gauges", "[ind]=[varIND]")
> >
> > The above fails with an run time error '2001'
> >
> > 'if I change the line to
> >
> > varUP = DLookup("[Max PSI]", "Gauges", "[ind]=1")
> >
> > It picks up the value
> >
> > I'm doing something wrong with the formating of the code.
> > Can anyone help.
> >
> > Thanks
> >
> > Geoff
.
- References:
- DLookup Problem
- From: g . ormesher
- Re: DLookup Problem
- From: Allen Browne
- DLookup Problem
- Prev by Date: Strange Problem doing DOS Dir Command in VBA Help Please
- Next by Date: Re: A2K - how to extend default cursor position to ALL textboxes?
- Previous by thread: Re: DLookup Problem
- Next by thread: checking input in inputbox
- Index(es):
Relevant Pages
|