Results 1 to 4 of 4
  1. #1
    Broderhol is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    2

    Edit List Items

    In my database, I have a field on the main form to enter a contact name (strContact). On this field, the user can either choose an established contact using the combo box, or edit the list. If the contact isn’t already on the list, the user will be prompted to add a new contact and a separate form will pop up to add this new contact (frmNewContact), and the name of the business this contact is affiliated with will automatically copy from the main form (frmMainForm) to frmNewContact for reference purposes. My problem is that after the message box pops up on frmMainForm asking the user if they want to add a new contact, it does take the user to the appropriate form (frmNewContact), but it doesn’t delete what the user had inputted in strContact on frmMainForm. The problem with this is then they complete the new contact info on frmNewContact, save, then they are taken back to frmMainForm but the original contact name previously typed is still in the field, and thus, the user is then prompted to add a new contact again, even though, by that time, the contact has already populated in the combo box. The only thing that can be done at this point is to ignore the text that was entered into strContact on frmMainForm, click the down arrow on the combo box, and choose the contact that was just entered into frmNewContact. How do I delete the original value that was input prior to editing the combo-box list?



    Thank you!

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Throw in a
    Me.strContact = vbNullString
    before the user is taken to the other form.

  3. #3
    Broderhol is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    2
    That works! Thank you! But now, strFirstName and strLastName on frmNewContact isn't populating in strContact on frmMainForm after the user presses "save" in frmNewContact.

    I've tried repainting frmMainForm and requerying strContact upon load, click, entrance, etc. Is there an easy fix for this?

  4. #4
    Swilliams987's Avatar
    Swilliams987 is offline Need Not Be Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2011
    Location
    Sacramento, CA
    Posts
    29
    Would anyone be kind enough to point me in the right direction? I'm working on a project with the above user and am also looking for the answer to this question.

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

Similar Threads

  1. Replies: 4
    Last Post: 04-05-2011, 06:12 PM
  2. Highlighting Items in List Box from Table Data
    By swalsh84 in forum Programming
    Replies: 2
    Last Post: 01-25-2010, 08:55 AM
  3. list box items
    By thewabit in forum Forms
    Replies: 12
    Last Post: 01-01-2010, 08:59 PM
  4. Generate a List of Items from "Many" Relationship
    By Hammer Mark in forum Reports
    Replies: 0
    Last Post: 04-20-2009, 07:30 AM
  5. Replies: 1
    Last Post: 11-11-2006, 08:23 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