DLOOKUP Trouble

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

hope someone can solve this, as its driving me nuts. I cant get a these two
dlookup statments in to one, i know its a syntax error, but i can't figure it
out for the life of me

Please any help would be appricated

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" & MySet(13) &
"'")

ORGCOST = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'")

they both work seperatly but not combined

Thanks in advance

Jay
 
Hi All

hope someone can solve this, as its driving me nuts. I cant get a these two
dlookup statments in to one, i know its a syntax error, but i can't figure it
out for the life of me

Please any help would be appricated

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" & MySet(13) &
"'")

ORGCOST = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'")

they both work seperatly but not combined

Thanks in advance

Jay

Combined into what?
You're looking at 2 different DLookUps with different criteria placed
into 2 different variables.
You need 2 different DLookUps. Nothing wrong with that.
 
Sorry, maybe i didn't explain it correctly, i need both of the criteria in
the same Dlookup so i can find the correct record, but when i join the two
dlookup statements i cant seem to get the syntax correct.

Thanks for your help

fredg said:
Hi All

hope someone can solve this, as its driving me nuts. I cant get a these two
dlookup statments in to one, i know its a syntax error, but i can't figure it
out for the life of me

Please any help would be appricated

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" & MySet(13) &
"'")

ORGCOST = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'")

they both work seperatly but not combined

Thanks in advance

Jay

Combined into what?
You're looking at 2 different DLookUps with different criteria placed
into 2 different variables.
You need 2 different DLookUps. Nothing wrong with that.
 
I tried this and i recieve type mismatch

OrgCost4 = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'" And "[TRACKING
NUMBER]='" & MySet(13) & "'")

Thanks again

fredg said:
Hi All

hope someone can solve this, as its driving me nuts. I cant get a these two
dlookup statments in to one, i know its a syntax error, but i can't figure it
out for the life of me

Please any help would be appricated

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" & MySet(13) &
"'")

ORGCOST = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'")

they both work seperatly but not combined

Thanks in advance

Jay

Combined into what?
You're looking at 2 different DLookUps with different criteria placed
into 2 different variables.
You need 2 different DLookUps. Nothing wrong with that.
 
Try:

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" & MySet(13) &
"' AND [CDESC] = 'FRT'")


--
Duane Hookom
MS Access MVP

Kuraige said:
Sorry, maybe i didn't explain it correctly, i need both of the criteria in
the same Dlookup so i can find the correct record, but when i join the two
dlookup statements i cant seem to get the syntax correct.

Thanks for your help

fredg said:
Hi All

hope someone can solve this, as its driving me nuts. I cant get a these
two
dlookup statments in to one, i know its a syntax error, but i can't
figure it
out for the life of me

Please any help would be appricated

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" &
MySet(13) &
"'")

ORGCOST = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'")

they both work seperatly but not combined

Thanks in advance

Jay

Combined into what?
You're looking at 2 different DLookUps with different criteria placed
into 2 different variables.
You need 2 different DLookUps. Nothing wrong with that.
 
That works perfectly thanks a million

Duane Hookom said:
Try:

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" & MySet(13) &
"' AND [CDESC] = 'FRT'")


--
Duane Hookom
MS Access MVP

Kuraige said:
Sorry, maybe i didn't explain it correctly, i need both of the criteria in
the same Dlookup so i can find the correct record, but when i join the two
dlookup statements i cant seem to get the syntax correct.

Thanks for your help

fredg said:
On Tue, 1 Aug 2006 13:28:01 -0700, Kuraige wrote:

Hi All

hope someone can solve this, as its driving me nuts. I cant get a these
two
dlookup statments in to one, i know its a syntax error, but i can't
figure it
out for the life of me

Please any help would be appricated

ORGCOST2 = DLookup("[COST]", "IMPORT", "[TRACKING NUMBER]='" &
MySet(13) &
"'")

ORGCOST = DLookup("[COST]", "IMPORT", "[CDESC] = 'FRT'")

they both work seperatly but not combined

Thanks in advance

Jay

Combined into what?
You're looking at 2 different DLookUps with different criteria placed
into 2 different variables.
You need 2 different DLookUps. Nothing wrong with that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top