Results 1 to 11 of 11
  1. #1
    Join Date
    May 2004
    Posts
    159

    Unanswered: How to store text without table?

    Is there a quick way to store text from a combobox into code so I don't
    need to use a table. This has to be keep when the program is shut down.
    Thanks

  2. #2
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231
    How's about writing the selected text into the .Tag property of the combobox? Maybe in the AfterUpdate event, put
    Code:
    combo.Tag = combo.Value
    that'll store whatever's in the combo box into the .Tag property. reference it by whatever=combo.Tag

    good luck

  3. #3
    Join Date
    Apr 2003
    Posts
    280
    Right-click on the combo box.
    Go to "Rowsource Type and change it to "Value List".
    Then go to RowSource and type in the values. Ex: 1;2;3 or 2000;2002;2003

  4. #4
    Join Date
    May 2004
    Posts
    159

    reply

    But wont that cause access to ask if you want to save the form change every time when closing??

  5. #5
    Join Date
    Apr 2003
    Posts
    280
    No, it doesn't. The only time it ask you to save the form again is when you make some changes to it.

  6. #6
    Join Date
    May 2004
    Posts
    159

    reply

    how would I do this with a text box or label? I have tried setting the tag property to the text but it will not change the tag when I look at its properties.

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Why do you need to do this?

    If it's THAT important that your user can't see the information, make registry entries.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    May 2004
    Posts
    159
    [QUOTE=jmahaffie]How's about writing the selected text into the .Tag property of the combobox? Maybe in the AfterUpdate event, put
    Code:
    combo.Tag = combo.Value
    that'll store whatever's in the combo box into the .Tag property. reference it by whatever=combo.Tag
    =======================================
    I can write to the tag property and store text there which is cool. The tag property is there for the storage of misc data according to the help notes.
    What I have found out and is not mentioned is that the data stored there is not actually written permenetely to the tag property. at least not for me.
    Closing the form erases the value assigned there so it looks like it is actually stored in memory not in the property. Putting something in the tag property by hand and closing results in a requestor asking about saving the form.
    It looks like storing anything in the form or in a module is going to cause that save requestor. Too bad as the tag property looks like it is exactly what I want to use. I just want it to be saved permenately not just during runtime.

  9. #9
    Join Date
    Apr 2003
    Posts
    280
    Quote Originally Posted by WilliamS
    Is there a quick way to store text from a combobox into code so I don't
    need to use a table. This has to be keep when the program is shut down.
    Thanks

    After reading it again, I'm a bit confused now. Could you please give us some example of the purpose of what you are trying to do?

  10. #10
    Join Date
    May 2004
    Posts
    159
    Quote Originally Posted by lansing
    After reading it again, I'm a bit confused now. Could you please give us some example of the purpose of what you are trying to do?
    Basically I want to store data from a textbox that can be retrieved later without having to open a table. By later I mean closing the program and restarting it after an unspecified time. I want to just store short messages like a comment window to show on startup.
    I see that I mistyped combo when I ment text. sorry about the confusion, I was interrupted and did not complete editing..

  11. #11
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    The short answer is this cannot be done.

    You want to alter the code, then save it, but not save it. That's flat out not going to work.

    You can either use a table, registery entry, or config file.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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