Form Filters on Load

G

Guest

Sir,
I have Invoice Form and Date Form or Table. Date Form stores no of months
for which user cant do entry before that month. I want that when i open
invoice form, it should restrict items whose no of months are less than
months mentioned in date table. My Invoice Form is Popup form. I want it
should automatically accept value from date table to restrict view.
I have mentioned codes for restricting view

Dim aNoLock As Variant
Dim aDateLock As Variant

aNoLock = DLookup("[Date Lock]![Edit]", "Date Lock")
aDateLock = DateAdd("m", -(aNoLock), DateSerial(Year(Date), Month(Date), 1))

Problem arises what vb codes should i give to filter out form on basis of
aDateLock, automatically and in which event. Am stuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top