Hi all,
I've run into the problem of the Dir function not wanting to work on certain machines. I've searched on here and read where some have made a user defined function containing the Dir function and then used it in their update query. My problem is I can't seem to get the user defined function (some call it a wrapper function) to work. In my update query which runs before the database fully launches...I have the following:
IIf(Dir("c:\Section_Cor_pictures\" & [Township] & [Range] & [Field29] & "_p" & ".jpg",3)<>"","c:\Section_Cor_pictures\" & [Township] & [Range] & [Field29] & "_p" & ".jpg","c:\ocsection\ocdef.bmp")
Which checks the above directory for a matching picture and puts that in my image field, otherwise it puts in a default bitmap (ocdef.bmp)
This query runs fine on the development machine...but I'm runing into error messages on some machines...so I need to have this redone somehow. Can anyone tell me how to make this update query into a "wrapper function" that I can call on its own or use in the query? Thanks in advance for any help.
I've run into the problem of the Dir function not wanting to work on certain machines. I've searched on here and read where some have made a user defined function containing the Dir function and then used it in their update query. My problem is I can't seem to get the user defined function (some call it a wrapper function) to work. In my update query which runs before the database fully launches...I have the following:
IIf(Dir("c:\Section_Cor_pictures\" & [Township] & [Range] & [Field29] & "_p" & ".jpg",3)<>"","c:\Section_Cor_pictures\" & [Township] & [Range] & [Field29] & "_p" & ".jpg","c:\ocsection\ocdef.bmp")
Which checks the above directory for a matching picture and puts that in my image field, otherwise it puts in a default bitmap (ocdef.bmp)
This query runs fine on the development machine...but I'm runing into error messages on some machines...so I need to have this redone somehow. Can anyone tell me how to make this update query into a "wrapper function" that I can call on its own or use in the query? Thanks in advance for any help.