+ Reply to Thread
Results 1 to 4 of 4

VBA to add 2 fields to an existing table (Access 2007)

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    VBA to add 2 fields to an existing table (Access 2007)

    I need help with the code below. I would like to add 2 extra fields to an existing table in Access.

    I am using Access 2007.

    First field is the Order Period field. It will be in a text format. Examples of the records in the Order Period field would be jun-12, jul-12, aug-12, may-12 (month-year). I want it to be automatically filled with the current month and current year of the above format when I run the macro.

    Second field is the Order Period Date field. It will also be in a text format. Examples of the records here would be 7/1/2012, 8/1/2012, 9/1/2012. It will always be in the 1st of each month in the current year. I want it to be automatically filled with the current month and current year of the above format when I run the macro.

    First field will be places in the third column and second field will be in the fourth column.

    Can anyone help me fix this code?

    Thanks!

    Please Login or Register  to view this content.

    Cross Post here: http://forums.aspfree.com/microsoft-...le-535740.html
    Last edited by ewong; 09-10-2012 at 11:49 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,945

    Re: VBA to add 2 fields to an existing table (Access 2007)

    Cross Posted:

    http://forums.aspfree.com/microsoft-...le-535740.html
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: VBA to add 2 fields to an existing table (Access 2007)

    Thanks Alan

    Hello ewong, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  4. #4
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: VBA to add 2 fields to an existing table (Access 2007)

    Ok, thanks Cutter!

    Quote Originally Posted by Cutter View Post
    Thanks Alan

    Hello ewong, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1