Results 1 to 7 of 7
  1. #1
    mcv110 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    4

    save user input from a textbox to a secondary textbox

    I have created a form to track inventory assets, the form was built from TblInventory. On the form is a textbox that I would like to use to save user input on changes to a specific asset.

    Is it possible to have the user type notes into the TxtNotes box, then save those notes into the TxtNotesHistory text box? As new notes are added I would like to keep old notes and append to the top, and I would really like to automatically prepend the date to each entry added.

    The TxtNotesHistory and TxtNotes text boxes are not bound to any record in the table.

    I have just learned of the SaveInput function and have also looked into creating a public sub with something like this - Public Sub RunImportProcedure(ByVal TxtNotes As String) which I think will capture the input of TxtNotes...though I am pretty green with Access and even less familiar with using almost any of the VBA elements.

    Thanks for any input. I have included a screenshot of the text boxes in question. Essentially I want to save that user input value of "test" in the History text box to the right of the Notes textbox.



    Click image for larger version. 

Name:	inventory screenshot.PNG 
Views:	11 
Size:	7.1 KB 
ID:	47358
    Last edited by mcv110; 03-02-2022 at 03:31 PM. Reason: deleted extra screenshot, fixed typo

  2. #2
    mcv110 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    4
    It occurs to me that the entries here should be bound to each piece of equipment. My TblInventory has a record for each piece of equipment, and I would like the notes section to reflect each individual record. Perhaps I have missed assigning some relation for the input and the record it belongs to

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    My advice would be to make each note a new record. By appending, you have no way of associating added notes with the entry date, the db user who input the notes, thus such details will not be searchable (i.e. notes between or on a date / by a user). You will have to use code to append to existing notes, or just let people click into the field and start typing. That's a good way to lose everything that was entered before, which means the entire notes history as well.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I'd expect you would use an append query.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    mcv110 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    4
    yeah that actually makes a lot of sense. I guess I just assumed there would be a simple VBA function I could run.

  6. #6
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Don't know whose reply that pertains to, but yes, it would be fairly simple to capture the existing text and append to it. It's just something that provides a whole lot of flexibility. In your form, you'd 'lock' the control that shows the existing comment and have an unbound control from which you'd concatenate (not append) the additional text. If this will be a short text field, you're limited to 255 characters. If you make it a memo (long text) field, you can introduce problems such as returning Asian like characters in query results and not being able to join the memo field in any query. You also cannot do other thing such as index the field (not that you'd likely want to index a comment field). All around, the idea of concatenating notes would be a non-starter for me - unless you were a paying customer who chose not to heed the advice.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    mcv110 is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2022
    Posts
    4
    Quote Originally Posted by Welshgasman View Post
    I'd expect you would use an append query.
    yeah that actually makes a lot of sense. I guess I just assumed there would be a simple VBA function I could run.

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

Similar Threads

  1. Replies: 5
    Last Post: 09-12-2017, 12:41 AM
  2. Replies: 1
    Last Post: 11-04-2014, 12:07 PM
  3. Replies: 2
    Last Post: 05-22-2014, 05:58 AM
  4. Input Value based on another textbox value
    By dude19 in forum Access
    Replies: 2
    Last Post: 06-30-2011, 03:48 PM
  5. Textbox will not allow input
    By cwf in forum Forms
    Replies: 0
    Last Post: 04-04-2008, 04:08 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