Skip to content
Advertisement

How do you use VBA to make a form jump to the nearest future date in Access?

I’m trying to get an MS Access database to open a form either to today’s date if it’s in the date field in the database, or the nearest date in the future. I tried the code here, but it doesn’t work. It just highlights the date field and goes to the first record instead of the nearest one in the future.

The Date field is WorshipDate and the table is wp_elements. (I am a pastor using this table to plan Sunday Worship).

I know the SQL code I included works because I am using it in a Python script that’s working quite well.

What am I missing? Or is there some other, easier way to do this?

Advertisement

Answer

You should only require one line of code:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement