garethEds Posted January 30, 2009 Posted January 30, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now