Results 1 to 2 of 2
  1. #1
    GinaFlan is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Location
    Texas
    Posts
    68

    Code the report so the control source of text box will change based on date or current month

    Click image for larger version. 

Name:	BusinessReport.PNG 
Views:	3 
Size:	262.0 KB 
ID:	18526 I need for the control source for each column to change based on the current date so the proper month's data will be displayed. I realize I can do this with DateAdd("M",-4,Date()) in my query, the problem is hiding duplicates conditional formatting and all of that. So instead of training employees to go into design view and change the control source in the drop down, it would seem like I could simply write code to make that happen. Like if the current month is October then Text box 1 = 7/1/2014 and so on. This is a rolling 3 month report. Is there a way?

  2. #2
    GinaFlan is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2014
    Location
    Texas
    Posts
    68
    Also where would I put the code under what event?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-03-2014, 10:07 AM
  2. Change a Control Source of a textbox VBA
    By WickidWe in forum Forms
    Replies: 1
    Last Post: 01-05-2014, 03:01 PM
  3. Replies: 1
    Last Post: 08-13-2013, 10:06 AM
  4. Copying entry form, change control source
    By Bdowns in forum Access
    Replies: 11
    Last Post: 02-06-2012, 05:39 PM
  5. Replies: 3
    Last Post: 06-03-2011, 03:09 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