I use fresh basil leaves in my pantry to keep them out of here. Also have heard of putting borax mixed in peanut butter and then stuffed into paper straws. You cut them into couple inch sections and lay them around your window sills to keep the ants at bay. If the window sills are high enough that your child can't reach as well as any animals that might work.