Results 1 to 8 of 8
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Editable field

    I have field on a form to which I have assigned a function which returns a string. But sometimes I need to edit the string returned by the function. This is not possible in the field which is bound to the function. Is there a way in which I can edit the field as well as have it bound to the function?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Use VBA to run function and set value of field. Trick is figuring out what event to call function.
    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
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You can't assign the ControlSource of the Control to your Function, in the Properties Pane, i.e.

    = FunctionName

    You'll have to use some other event and code such as,

    Me.ControlName = FunctionName

    Then you will be able to edit the value.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Or maybe use the default value property to add the value returned by the function when creating a new record.

    Cheers,
    Vlad

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Gicu View Post
    ...Or maybe use the default value property to add the value returned by the function when creating a new record...
    That would depend, I think, on whether or not the Function depends on some value that first has to be entered in the New Record.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by June7 View Post
    Use VBA to run function and set value of field. Trick is figuring out what event to call function.


    Thanks!! GOD BLESS YOU!!!!!

  7. #7
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by Missinglinq View Post
    You can't assign the ControlSource of the Control to your Function, in the Properties Pane, i.e.

    = FunctionName

    You'll have to use some other event and code such as,

    Thanks!! GOD BLESS YOU!!!!!

    Me.ControlName = FunctionName

    Then you will be able to edit the value.

    Linq ;0)>
    Thanks!! GOD BLESS YOU!!!!!

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. One editable form field
    By adame in forum Forms
    Replies: 2
    Last Post: 01-19-2017, 05:38 AM
  2. Making records un-editable
    By Haggrr in forum Programming
    Replies: 13
    Last Post: 12-30-2014, 03:27 PM
  3. Replies: 8
    Last Post: 11-16-2014, 04:22 PM
  4. field in query "not editable" ...
    By fluppe in forum Programming
    Replies: 8
    Last Post: 10-22-2014, 01:07 AM
  5. Making a field non-editable after save
    By carlyd in forum Forms
    Replies: 10
    Last Post: 02-18-2012, 08:23 AM

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