Results 1 to 3 of 3

Thread: Savesetting and Cmbo

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2004
    Location
    USA - Michigan
    Posts
    94

    Savesetting and Cmbo

    Well i got the SaveSetting function to work, but it only saves the selected data in the combobox, and i need it to save the whole box

    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2. SaveSetting "ProgHelper", "Comboboxes", "cmboUProgs", frmProgHelper.cmboUProgs
    3.  
    4.  
    5.  
    6. End
    7. End Sub

    any help?
    --Semper Fi--

    --Area 61 Admin--

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    There are several ways you could go about doing that. One is to loop through all the entries in the combobox and create a comma-delimited string that looks like "apples,oranges,pears,grapes" and save that using SaveSetting. Then after you do the GetSetting, use Splt to break up the string.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Oh, I also just noticed you use End. There's no need to do that. If that form is your only form then change it to Set MyFormName = Nothing (but you provbably don't even need that). If you have more than one form you need to unload all of them. If you need an example of doing that then search this forum for UnloadAllForms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width