From: Flopbot on 22 Apr 2010 17:51 Thank you for any help! I've read the forums and don't understand most of the postings since I don't know how to program code. I have an Access '03 DB with “Tbl Volunteer Opportunities” that has a field named [Date]. The events we track occur daily for about three months into the future. It's tedious entering each date individually. I added a command button and, when clicked, would like for it to automatically add one new record for each new day of the next month (or just 31 days out). I know how to get to the Private Sub Command for the button but that's as far as I can get knowledge wise. That's why I'm asking the sages. :) Private Sub Command8_Click() End Sub
From: John W. Vinson on 22 Apr 2010 18:26 On Thu, 22 Apr 2010 14:51:01 -0700, Flopbot <Flopbot(a)discussions.microsoft.com> wrote: >Thank you for any help! I�ve read the forums and don�t understand most of >the postings since I don�t know how to program code. I have an Access �03 DB >with �Tbl Volunteer Opportunities� that has a field named [Date]. The events >we track occur daily for about three months into the future. It�s tedious >entering each date individually. I added a command button and, when clicked, >would like for it to automatically add one new record for each new day of the >next month (or just 31 days out). I know how to get to the Private Sub >Command for the button but that�s as far as I can get knowledge wise. That�s >why I�m asking the sages. :) > >Private Sub Command8_Click() > >End Sub It's almost certainly a Very Bad Idea to do this. Blank, empty "placeholder" records have a nasty way of never getting filled in! I'd suggest a different approach. Use a Form to enter data, and put code on its BeforeInsert event to automatically increment the date. How are your tables structured and related? How are you entering data now? It's easy enough, but I don't want to give you sample code that would not fit your database... -- John W. Vinson [MVP]
From: Flopbot on 22 Apr 2010 22:00 John, Thank you for your help. This database is used for tracking volunteer needs at a museum. Currently, I have an excel sheet where I drag down new dates lickity spit. Excel's wonderful that way, but I really need to start tracking them in Access to cut down on double entry. We certainly always have need for volunteers and I do want a record of those events that I didn't find volunteers for. However, I understand your concern about blank records. The majority of my records will be similar and I have the table set up to pre-populate any new records with the most common event information (location, type, etc.). I'll be entering them en mass in a SubForm datasheet view so I don't want to type each date one at a time. Ideally, I'd love to have some type of Outlook date-entry interface but, like I said, I don't have the knowledge of code for that. Therefore, I've given it a lot of though and do believe that the control tab button would be the best solution in my case. However, maybe after the first one is working, I could experiment with making others to add “the next 31 days minus Mondays” (closed), etc. Relationship: “Frm Volunteer Opportunities” has “SubFrm Vol opportunities” which pulls from “Tbl Vol Opportunities” Chris "John W. Vinson" wrote: > On Thu, 22 Apr 2010 14:51:01 -0700, Flopbot > <Flopbot(a)discussions.microsoft.com> wrote: > > >Thank you for any help! I've read the forums and don't understand most of > >the postings since I don't know how to program code. I have an Access '03 DB > >with “Tbl Volunteer Opportunities” that has a field named [Date]. The events > >we track occur daily for about three months into the future. It's tedious > >entering each date individually. I added a command button and, when clicked, > >would like for it to automatically add one new record for each new day of the > >next month (or just 31 days out). I know how to get to the Private Sub > >Command for the button but that's as far as I can get knowledge wise. That's > >why I'm asking the sages. :) > > > >Private Sub Command8_Click() > > > >End Sub > > It's almost certainly a Very Bad Idea to do this. Blank, empty "placeholder" > records have a nasty way of never getting filled in! > > I'd suggest a different approach. Use a Form to enter data, and put code on > its BeforeInsert event to automatically increment the date. How are your > tables structured and related? How are you entering data now? It's easy > enough, but I don't want to give you sample code that would not fit your > database... > > -- > > John W. Vinson [MVP] > . >
|
Pages: 1 Prev: Applying Hyperlink in Access Genrated Email Next: postmessage to kill mdn application |