Results 1 to 5 of 5
  1. #1
    neill_long is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    9

    check box selected and automatically update another field with specific data

    Hello



    I have a form that when a check box is selected, the date field will automatically populate with todays date. I also want it to populate another field but unsure how to do it and need some advice.

    The field I want to populate is Finance Account Code. The data in it should be ID Number (which in this example is 123456) this field is called Borrower#. There should be a D at the start of the number when in the finance account code. So in this example the field would say D123456.

    Click image for larger version. 

Name:	form.jpg 
Views:	20 
Size:	33.1 KB 
ID:	34347

    on the check box, I have embedded a macro:

    Click image for larger version. 

Name:	date.jpg 
Views:	20 
Size:	12.6 KB 
ID:	34348

    Do I need to set something up on this macro or do you have a better suggestion?

    thanks
    Alistair

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I don't use macros, but you should be able to add another SetProperty to set the value of the account textbox. You realize you're including time in your date value? The Date() function will input just the date, if that's more appropriate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    By the way, the second example here would be the VBA method to do what you're doing:

    http://www.baldyweb.com/ConditionalVisibility.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    neill_long is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jun 2018
    Posts
    9
    I hadn't realised about the date but have changed it now.

    I have added the VBA and it is working perfectly. thanks very much for your help

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 08-05-2017, 06:43 PM
  2. Replies: 2
    Last Post: 08-05-2015, 04:06 PM
  3. Replies: 1
    Last Post: 05-31-2015, 09:20 AM
  4. Replies: 6
    Last Post: 06-26-2013, 12:14 PM
  5. Replies: 10
    Last Post: 10-11-2012, 01:19 PM

Tags for this Thread

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