dlookup in query freezes sql server

lala

Registered User.
Local time
Today, 14:09
Joined
Mar 20, 2002
Messages
741
first of all, i apologize, i converted my db to sql server and keep having problems so i've already posted and will keep posting more questions.


Code:
IIf(Not IsNull([SVCSETSSERVICEITEMS].[RefFIeld]),
IIf(Not IsNull([RefFIeld]),[RefText]) & 
DLookUp([RefFIeld],'QFilesServices','ID=' & [QFilesServices].[ID]))


this field is part of an append query. when i run the update query the tab;e freezes and then gives me q timout error a minute or so later. without this field it updates in a milisecond

i'm almost sure this is the part that makes it go crazy. what can i do?

Code:
DLookUp([RefFIeld],'QFilesServices','ID=' & [QFilesServices].[ID])

thank you


ETA oh yeah, the reason [RefFIeld] is in brackets and not quotes is because i'm trying to look up the value of the field in the brackets. so for example, if RefField=FileNumber then i need the value that's in the FileNumber field.
this worked in Access with an access BE, but acting out with a SQL BE
 
i didn't fix it but i created a make-table query with this field and then an update query

it's something about the SQL server that doesn't like some of the stuff that access lets me get away with. this is a second issue like this: something that worked with an access BE and doesn't work with an SQL BE

so this is not in issue anymore.

unfortunately, i'm sure i will be back for something else)))))))))))
 

Users who are viewing this thread

Back
Top Bottom