Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    llgtjb001 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Sep 2015
    Posts
    33


    Quote Originally Posted by June7 View Post
    The & is concatenation operator. strStart is a variable. This is how strings are built using literal text and variables.

    Exactly where did you put the code - is it behind a form or in a general module? Should be behind form that has the controls. Listbox or combobox or textbox - doesn't matter.

    You need an understanding of basic programming concepts if you are going to pursue db customization with VBA.

    http://holowczak.com/programming-con...l-programmers/

    Here is a VBA tutorial. http://www.access-vba.net/introducti...ccess-vba.html
    Thanks, I learned some basic vb now. so you used &strStart& to instead of the years(2013)? I should type B1.[MAT Jan"&strStart&"_Sale]=N1.MAT Jan"&strStart&"_sale], right?

    Also, I want to the btnUpdate to achieve this function, so I just type code in btnUpdate?

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Select [Event Procedure] in the button Click event then click the ellipsis (...) to open VBA editor at the event procedure. Type code there.

    Need space before and after &.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. pulling field names from table
    By murfeezlaw in forum Queries
    Replies: 6
    Last Post: 11-27-2012, 04:30 PM
  2. Concat field names in Update SQL
    By Deutz in forum Queries
    Replies: 8
    Last Post: 09-21-2011, 05:43 PM
  3. Filtering on Field Names from Table
    By reddog1898 in forum Access
    Replies: 3
    Last Post: 05-13-2011, 10:47 AM
  4. Replies: 1
    Last Post: 05-17-2010, 12:21 PM
  5. Replies: 5
    Last Post: 03-31-2009, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums