DLookUp

  • Thread starter Thread starter Don Sealer
  • Start date Start date
D

Don Sealer

Can I have this function look up more than one other field? For instance, I
have a lookup now that does this:
Me!Casting = DLookup("[Casting]", "Part# Table", "[PartID] = '" &
Me!PartID & "'")
What this does is, when I enter the PartID the Casting field is accessed and
inputted into the form. Is it possible to do the same thing but then also
have a file accessed and inputted into the form.
Just in case I'm not clear on what I'm trying to do let me explain it
another way.
Right now I input a number (PartID) that inserts a casting description
(Casting) into my form. I'd also like the PartID to bring up a hyperlink
file as well as the Casting description.
Is it possible? If so how would I make it happen.
Thanks,
Don..................
 
DLookup will return a single value. That can be the value of a single field,
or the value of a calculated "field" (where you're combining two fields, for
example, in the first argument in an expression; or where you mutiply a
field's value by some number, for example).

If you want to get two different "values", you can't put them into a single
control any way. You'd need two controls to hold them, wouldn't you?
 
Thanks Ken, I did figure it out. I just added another line to the code.
I've got another question about lookups if you'd be interested in taking a
look I'd be interested in reading what you have to say.
Thanks again,
Don........





Ken Snell said:
DLookup will return a single value. That can be the value of a single field,
or the value of a calculated "field" (where you're combining two fields, for
example, in the first argument in an expression; or where you mutiply a
field's value by some number, for example).

If you want to get two different "values", you can't put them into a single
control any way. You'd need two controls to hold them, wouldn't you?

--

Ken Snell
<MS ACCESS MVP>


Don Sealer said:
Can I have this function look up more than one other field? For instance,
I
have a lookup now that does this:
Me!Casting = DLookup("[Casting]", "Part# Table", "[PartID] = '" &
Me!PartID & "'")
What this does is, when I enter the PartID the Casting field is accessed
and
inputted into the form. Is it possible to do the same thing but then also
have a file accessed and inputted into the form.
Just in case I'm not clear on what I'm trying to do let me explain it
another way.
Right now I input a number (PartID) that inserts a casting description
(Casting) into my form. I'd also like the PartID to bring up a hyperlink
file as well as the Casting description.
Is it possible? If so how would I make it happen.
Thanks,
Don..................
 
Back
Top