OpenForm changes Filter

alexmb1

Registered User.
Local time
Today, 05:08
Joined
Jun 15, 2009
Messages
41
I have two forms 'employees' and 'residences'
in the 'employees' form i have a filter that removes past employees based on a departure date. the filter is:

Departure is null or Departure>= int(now())

in the residences form i have a openForm cmd that opens the employee form the the occupant of a residence. the problem is that this resets my filter and the next time i open the employee form all of the employees are included, even the past ones.

is there a way to avaoid changing my filter or a VBA i can use to reset my filter for the employees table after i click the openFrom cmd in my residence form?

thanks
 
You need to change the Now() for Date() as now equals the date and time.

David
 
I inserted a RunMacro cmd after my code and had it reset the filter to the date. works fine now.
 

Users who are viewing this thread

Back
Top Bottom