Results 1 to 10 of 10
  1. #1
    Susy is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2014
    Posts
    134

    vba change string value from a (subform in a form) by opening a pop up form with correct values

    Hi there,

    I have this subform in a form and a "field" in this subform might oft contain wrong data.

    I also have a table with correct matches to erroneous data for this "field" in the subform.

    I would really like to be able to click on this field (datasheet view) from the subform and open a search form (with the data from this "correct" table) and select the value which could be or is the correct one, and then update this field in the subform.

    Am I making any sense?

    Regards

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    you cant make this field a combo box, where the choices are from the table?
    allow any value entered, but you can still pick from the list.
    thus eliminating the extra form.

  3. #3
    Susy is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2014
    Posts
    134
    Yes, I thought about this, the issue is that I am importing data and doing some modifications... plus, the search function from a combobox is not really efficient, especially if the string is long and it contains many words...

    we make our lifes complicated, right!

    I guess I will keep experimenting... still open for some tips or code...

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Have a button on the subform. On click, open a popup/modal form with a list box of all valid entries. On double-click, close the form and set the field on the subform to the value selected.

  5. #5
    Susy is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2014
    Posts
    134
    that is exactly what I am looking for... do you know how? That will be awesome!

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    What part are you struggling with? Ask specific questions.

  7. #7
    Susy is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2014
    Posts
    134
    I will upload an example with what I have worked on until now... :-) then you will see!

  8. #8
    Susy is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2014
    Posts
    134
    Here is my sample database....

    The idea is that after the data has been imported and saved in a table, one can open it and look through the values (hyperlink) and those values which are wrong can be updated by clicking on them and then looking for the correct values.

    Another thing I am not able is to select the correct value from the list box by clicking...

    And updating the value in the main form.




    Some thoughts, ideas, references, code???
    Attached Files Attached Files

  9. #9
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Your tables aren't normalized, you need to carry the WorldID instead of the Region on your table. That requires that the changes need to happen on your import procedure, not after the table has been populated.
    Attached Files Attached Files

  10. #10
    Susy is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2014
    Posts
    134
    Hi aytee111, thanks for your comment. I know, I just did it like that as an example.

    Even if I do it like that so I can use OpenArgs (with the WorldID), I still don't know how to transport the values between the form and I still don't know how to select the correct value from the list.


    (I just open the file you attached... it looks very professional and the code is pretty cool, but, how can this help me...?)


    Anyhow, thanks...


    If anyone else has an idea, it will be great.
    Last edited by Susy; 04-22-2017 at 09:39 AM.

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

Similar Threads

  1. Replies: 8
    Last Post: 03-20-2017, 07:22 PM
  2. Use String to change form control values
    By DerekAwesome in forum Programming
    Replies: 14
    Last Post: 12-02-2012, 07:19 PM
  3. Replies: 4
    Last Post: 03-05-2012, 10:20 AM
  4. Form Not Opening Correct Record
    By halfaguava in forum Forms
    Replies: 1
    Last Post: 06-09-2011, 07:00 PM
  5. Opening form to correct record. Bookmark?
    By stephenaa5 in forum Forms
    Replies: 11
    Last Post: 12-29-2009, 02:43 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