Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Posts
    32

    Unanswered: Write to table from Listbox

    Ok guys! You have all been a great help to me with access so far. Thank you for putting up with my strange questions!

    Im still working on the same project and it is going well... Ever time I figure out how to do the next step I realize the next step is also right out of my knowladge base! lol

    Anyway

    I have a list box on one of my forms that holds numbers(Lead ID's). There is also a txt box with a number in it (Call ID).

    I want the form to save that data to a M:N table when I save what i have entered about the call.

    So like the CALL ID might be 123
    and the list box might have
    1355
    165
    5
    5464

    And so i want to write to the M:N Table
    123 | 1355
    123 | 165
    123 | 5
    123 | 5464

    The problem i have is that the form is already writing to the Call Table so I need to do this in VBA and dont know where to start really.

    Any help would be apples.

    Thanks

    Sid

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so you either use an unbound list box which when selected triggers a multi row form, or use a sub form to store details of each individual conversation/contact. the parent form contains data relevant to all conversations for that contact eg person, company and so on), the sub form contains details of who said what to whom and when
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2009
    Posts
    32
    The list box is unbound. But what kind of VBA code will get the info from the listbox and textbox and write it to a table? Ive been researching makeing a UPDATE query in code but im still surfing for the answer to that.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    OK so you need to coridnate the list box with the data
    one way to do this is to apply a filter in the list boxes' on click event.
    I can/t remember if by applyign a filter you automatically set the value, but if not then you need to set the callid to the value from the list box.

    if you do go down this route you need to think through how you will add new rows to the call id.

    the parent/sub form model would allow you to enter a callid/new head record and then automativcally pickup that value in the call details.
    I'd rather be riding on the Tiger 800 or the Norton

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
  •