Results 1 to 6 of 6
  1. #1
    Korreia is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    5

    Expression Builder in Data Macro

    Hi All,

    I'm facing an issue when I'm creating a Data Macro After Insert in Access 2010. In the value for the SetField, I use the expression builder. I wanted to use the DateAdd function but it not showing, also I cannot see my user define function (Module).

    This behaviour seem to occur only in the instance of Expression Builder while in the Data Macro, everything is fine anywhere else including macro.

    Any idea?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I tested ExpressionBuilder from the event property as well as within the macro. I do see DateAdd function under the Intrinsic-Date/Time category. I also see my custom function under the module functions. Can't replicate the issue.
    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.

  3. #3
    Korreia is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    5
    Thanks for the reply

    This issue only occur while in the Data Macro. While in Macro, the Expression Builder shows the DateAdd and my module Function. Not sure which version of Access you've tested this, however Data Macro is a new feature of Access 2010. Must be on Table Design to be able to set Data Macro triggers After Update or other event.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I get it now. Have not used DataMacros yet. I guess that's the way it is then. Some functions not available to DataMacros.
    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.

  5. #5
    Korreia is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    5
    Any idea how I could DataAdd or achieve the same with other function? I need to add 3 month to a date in another table (tblRenewals) After Insert in tblMembers. That why I want to use DataMacro. I know I could do it via a form, however I want to do it a table level since a user could go directly in the tblMembers and add a new row without adding 3 month to the date in tblrenewals. I try using this Month(Now()+3), it work for the month but the day and year is not right...

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why do you need to save calculated data? Can't you just calculate when needed? Is DateSerial available to DataMacros? (Don't have 2010 available at the moment)

    DateSerial(Year(Date()), Month(Date())+3, Day(Date()))

    or

    CDate(Month(Date())+3 & "/" & Day(Date()) & "/" & Year(Date()))
    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.

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

Similar Threads

  1. Expression builder help
    By jigg14 in forum Forms
    Replies: 1
    Last Post: 03-19-2012, 09:47 AM
  2. expression builder
    By tonyl in forum Access
    Replies: 3
    Last Post: 11-26-2011, 12:00 AM
  3. Expression Builder or VB ... Help
    By Adynn in forum Access
    Replies: 0
    Last Post: 06-03-2011, 09:51 AM
  4. Expression builder
    By PJ_d_DJ in forum Access
    Replies: 2
    Last Post: 02-24-2011, 03:38 AM
  5. Expression Builder
    By mistaken_myst in forum Access
    Replies: 2
    Last Post: 05-07-2008, 01:30 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