Office Software Thread, Using VBA to find a date from a table. in Technical; Hi Everyone,
Following advice on here I have decided to ditch Macros and move over to learning VBA. This is ...
-
30th January 2009, 03:19 PM #1 Using VBA to find a date from a table.
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
-
-
IDG Tech News
SHARE:
Similar Threads
-
Replies: 8
Last Post: 22nd January 2009, 05:40 PM
-
By PiqueABoo in forum Coding
Replies: 0
Last Post: 25th November 2008, 04:45 PM
-
By cursong in forum Coding
Replies: 1
Last Post: 13th October 2008, 11:28 AM
-
By iuppiter in forum Coding
Replies: 2
Last Post: 8th September 2008, 03:47 PM
-
By randle in forum Windows
Replies: 10
Last Post: 9th February 2007, 10:32 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules