MAcro Question

I have a database and form. I have two fields with dates in them, I want to be able to have a reminder set on these two dare fields that will popup 30 days prior to the actual date.

I am not fimillar with writting macros and would appreciate help in getting this working

Hello @Brettg,
a similar question was asked two days ago here. If that was also you, then i suggest to continue there.

thank you!

Hello @Brettg,

in addition to Ratslinger’s solution above, here is an example which uses a macro to display the reminder when the file is opened.

Upcoming_Events.odb

Good answer, I voted for it.

While I see you have since responded to @librebel while I was working on an answer, I will still post here.

I have re-opened this question as there is no justification to close it. Although the comment by @librebel does appear to be a valid question, there is no real evidence it is true (at time question was closed).

I always hesitate to provide macro code especially when the question states as to having no experience in the area. Even if the code works, there is no knowledge by the recipient to change it if other things in the Base file change which then requires a change to the code. If this happens down the road, you are back to square one with nothing working correctly. Unfortunately, myself included, we still provide macro code perhaps not knowing the user has no knowledge.

However, the forum is meant to help people when they ask questions even if the question may not be asked in the manner we would like to see. I believe that is the case here.

What you seem to be looking for is a way to track when items are going to expire within a reasonable time frame - within one month here. Your request to have a popup is not reasonable as you would still need to reveal each record for the popup to occur.

My proposed solution is a separate form showing ALL items which will expire within the next month. This will allow you to pull up the form any time you want to see the list. The good thing here is that it requires NO macro coding. Instead this is all done through a query. The problem with your situation is that you are probably using Base as it came from LO. This has an old database which is not capable of handling date addition/subtraction as easily as newer versions but still can be done.

The attached sample will demonstrate this process. It should be self explanatory. You will see the query appears to be complex but it is necessary because of date arithmetic handling. Now this probably means (just as in the macro argument) you need to learn at least some SQL in case of future adjustments. There are many sites available to assist - (click here) is one.

Sample - ExpirationDate.odb EDIT: replaced sample; needed correction to SQL as it did not always handle January dates correctly.

If this answers your question please click on the :heavy_check_mark: (upper left area of answer).

that is very helpful,
thank you