Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Hi Everyone,

 

Following advice on here I have decided to ditch Macros and move over to learning VBA. This is where I get stuck.

 

I have a table which contains the following:

 

tbl_daily_gifts {date, gift code, issued_today, max_today}

 

When a user clicks on a button in a form I want to validate the gift is available on that date so the pseudocode kind of looks like this..

 

Read today's date

Is that gift available today?

If No = MsgBox "That gift isn't available"; End

If Yes = max_today-1 ; issued_today+1

Continue with rest of procedure

 

The rest of the procedure after this works. I just want to add this above in as extra validation or else guests will be able to claim gifts and print vouchers even if they are not available on that day.

 

The table (tbl_daiy_gifts) has several gifts in there available on numerous days. I just don't know how to get the code to compare todays date to the one in the table.

 

Any help appreciated,

 

Gareth

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...