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,