I have a VBA script which autofilters data on a datasheet form. What I would like is for the VBA to use the same criteria it is filtering by to enter a bit of text in to the first field on the form (Alert). An example of the autofilter is:
Code:
"[DateofConsult]<" & Format(myval, "\#m/d/yyyy\#")
. This code basically filters any consult that is older than 120 days old. I would like for it to put in the Alert column 'Older than 120 days' so the person running this will know why it hit there. There are many different filters so I want to make it as clear as possible.
I have done this with queries before but due to uncontrollable limitations on my office network, the large union query runs incredibly slow compared to filtering and with union queries I was unable to have an editable query/datasheet form.