Ask Your Question

MAcro Question

asked 2017-06-22 14:04:51 +0200

Brettg gravatar image

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

edit retag flag offensive close merge delete



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

librebel gravatar imagelibrebel ( 2017-06-22 14:32:25 +0200 )edit

thank you!

Brettg gravatar imageBrettg ( 2017-06-22 16:46:55 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2017-06-22 19:35:16 +0200

Ratslinger gravatar image

updated 2017-06-22 20:46:26 +0200

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 ✔ (upper left area of answer).

edit flag offensive delete link more

answered 2017-06-23 00:12:35 +0200

librebel gravatar image

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.


edit flag offensive delete link more


Good answer, I voted for it. gravatar ( 2017-06-23 11:58:11 +0200 )edit

answered 2017-06-22 21:24:36 +0200

Brettg gravatar image

that is very helpful, thank you

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-06-22 14:04:51 +0200

Seen: 123 times

Last updated: Jun 23 '17