Results 1 to 4 of 4
  1. #1
    mainman11 is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2021
    Posts
    1

    How to place inserted values from one field to another based on selected combo box values in a diffe

    I have created a combo box in a form. The user can select two options. If a specific option is selected, values earlier inserted in a specific field of a different form should be automatically removed there and inserted in the column which is selected in the other form. Does anybody know how to achieve this in MS Access? I am a total beginner at VBA code. Would it be an idea to create an event procedure on change where I update the fields in the first form based on the selection of the combo box?
    I am using access 2010.


  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    Possible? Sure. Unusual? Yep.

    Without seeing your db it will be hard to guide you on specifics.

    Maybe if you could describe more overall what's going on we can help you better or even provide alternatives that might be more appropriate. Is the other from still open? Is this data from both forms saved to a table? Are these forms bound to tables? What if the user makes a mistake in the combobox? Are you building something like a wizard ui for your users?

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,368
    Is the other (1st) form open at the time, but more importantly, is it bound (or at least are the fields that are to be edited bound)? If they are bound, there is no need to alter form field data - just update the table fields directly. I would also requery the 1st form from this code behind the 2nd form. However, I don't know what you mean by inserted into a column. Column of some combo (i.e. add it to its list) or is this about a datasheet column? In the latter case, seems like you want to update a table field to Null (as in the first part I mentioned) and update some other table field to that value. I find that to be a strange notion. Why would anyone move values around like this?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,235
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 7
    Last Post: 03-07-2017, 03:01 PM
  2. Replies: 1
    Last Post: 11-22-2016, 06:31 AM
  3. Replies: 11
    Last Post: 08-05-2014, 11:59 AM
  4. Replies: 1
    Last Post: 02-19-2014, 11:07 AM
  5. Replies: 1
    Last Post: 03-27-2010, 06:13 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