locked
Need Help Changing a Text Box Value with Macro in Access Web App RRS feed

  • Question

  • Hi,

    I'm running a macro on a button click in order to duplicate a record and change a text box from it's current value to a new value, replacing the word "Fall" with "Spring".

    Here is my macro code:  https://drive.google.com/open?id=0Bzc-OnhLGLTmNGlGMjBRcXlTRUU

    Here is the web app: https://drive.google.com/open?id=0Bzc-OnhLGLTmTFc4VXREZGdvMHM

    The control name of the text box I want to change is ClassAutocomplete.

    As is, the macro runs, but does not change the word "Fall" to Spring". It simply copies the record over without changing anything.

    Can anyone help with this?

    Thanks

    Friday, February 17, 2017 9:45 PM

All replies

  • Hi,

    I failed to reproduce your issue with a text box control. The record would be copied and the replace function would take effect.

    According to your control name, do you use a autocomplete control?


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 20, 2017 6:41 AM
  • Yes, it's a lookup to another table. And I believe the field is an autocomplete field.
    Monday, February 20, 2017 3:11 PM
  • It is an autocomplete control. So if you want to replace the Fall into Spring, please make sure the record Spring exists in the table. Besides, I think the autocomplete control is bound to ID, so if the record Spring exists in the database, when replace the value, you need to pass the ID instead of the current show value.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 21, 2017 7:23 AM