I have a form that is bassed on a querry that works fine but when there is no data nothing on the form detail shows up. I don't mind this but would like to run a macro when the data is empty so how do i do this. I know you probably have to use the if function but don't know the exact code. I also don't know where to put it. Cheers.