How to save listbox items to my access (2016)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ijared
    New Member
    • May 2018
    • 25

    How to save listbox items to my access (2016)

    Hello,

    I have this the response data and want to the response to 2016 acces everytime. I do get the details in my listbox but don't know how to save them to access.
    Any help?

    Code:
    Private Sub Addtolist_Click()
        Me.vol__my_worked_hrs.AddItem Me.MyText1
        Me.vol__my_worked_hrs.AddItem Me.MyText2
    End Sub
    ijared
    Last edited by twinnyfo; May 23 '18, 04:14 PM. Reason: Added code tags
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3655

    #2
    ijared,

    Welcome to Bytes!

    At this point, it is unclear how you want to save your data. Saving data to a list box will simply save it temporarily until your form is closed. Do you also want to save it permanently in your Database?

    Some clarification would help before we start providing recommendations which won't really answer your question.

    Thanks!

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32645

      #3
      I believe I deleted one of your threads already because it was such a mess that you clearly hadn't even bothered to read it yourself before posting it. This is little better. Very little here, but even that has mistakes that one wouldn't expect from a child. 'Access' spelt two different ways within a few words of each other. Very little sense in the question as words are next to each other that don't make any sense.

      If you want help with your problems then take the time to read your own posts before posting them. This is not an unreasonable requirement. You want others to read it and help, but you don't want to go to the trouble of reading it first yourself? This is totally unacceptable - particularly as it's your second attempt.

      If you want help here then do the basics first. That is a fundamental requirement. You can be sure that I'll be keeping a close eye on your progress.

      Comment

      • ijared
        New Member
        • May 2018
        • 25

        #4
        Saving listbox input details to access

        Originally posted by NeoPa
        I believe I deleted one of your threads already because it was such a mess that you clearly hadn't even bothered to read it yourself before posting it. This is little better. Very little here, but even that has mistakes that one wouldn't expect from a child. 'Access' spelt two different ways within a few words of each other. Very little sense in the question as words are next to each other that don't make any sense.

        If you want help with your problems then take the time to read your own posts before posting them. This is not an unreasonable requirement. You want others to read it and help, but you don't want to go to the trouble of reading it first yourself? This is totally unacceptable - particularly as it's your second attempt.

        If you want help here then do the basics first. That is a fundamental requirement. You can be sure that I'll be keeping a close eye on your progress.
        ---------------------
        I have read everything and can't see where I wrote wrong. What was it? I wanted to save the listbox data to aaccess.
        Last edited by ijared; May 30 '18, 11:58 AM. Reason: Completed the question.

        Comment

        • twinnyfo
          Recognized Expert Moderator Specialist
          • Nov 2011
          • 3655

          #5
          ijared,

          As is a standard procedure in this forum, it is reasonable to expect that when we ask questions about your post that we receive an answer. I expressed that your post was unclear, so I asked for a clarificaiton (which you have not answered). You simply state:
          I wanted to save the listbox data to aaccess
          This is not helpful.

          NeoPa also, in greater detail, expressed the lack of clarity in your post, and you have not provided any additional, helpful information.

          We are very willing to help, but we are unable to read minds, so we ask questions in hopes of getting greater clarification. That is not too much to ask.

          Please provide some additional information if you truly want some assistance from this site.

          Thanks!

          Comment

          • ijared
            New Member
            • May 2018
            • 25

            #6
            What I was saying is thet, others may gime me a text like June 2018 the volunteer worked for 30 thrs.
            I will then save that information into the database.
            Next month I may recieve similar information of another volunteer and I save the information.
            So it is the information month, worked hours I eant to save.

            Comment

            • twinnyfo
              Recognized Expert Moderator Specialist
              • Nov 2011
              • 3655

              #7
              First, this information would not typically be placed into a list box. You should simply use text boxes, which should get the job done perfectly fine. Unless there is a good reason to use a list box, I would go in that direction. Simply have a form that is bound to your volunteers table (or their list of hours) and go from there.

              However, without knowing details about your database structure and tables, I can't provide anything more specific.

              Comment

              • ijared
                New Member
                • May 2018
                • 25

                #8
                Thanks. I think then that I will try using only a textbox. I am only given normal text containing that information and I decide how to use it. They just want me to present in the databse.

                Comment

                • ijared
                  New Member
                  • May 2018
                  • 25

                  #9
                  So you suggest I should bound a textbox to a text field with a text datatype that I already have in the database?

                  Comment

                  • twinnyfo
                    Recognized Expert Moderator Specialist
                    • Nov 2011
                    • 3655

                    #10
                    yes. I can only assume you would have several fields: Volunteer (text), Date (Date), Number of hours (number)....

                    Comment

                    • ijared
                      New Member
                      • May 2018
                      • 25

                      #11
                      I understand what you are saying. I will work on that. Thanks.

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32645

                        #12
                        Originally posted by IJared
                        IJared:
                        I have read everything and can't see where I wrote wrong. What was it? I wanted to save the listbox data to aaccess.
                        Your latest three posts (as of now) apppear to be fine. We make allowances for your not being a native English speaker. There are errors even there, but understandable ones.

                        NB. Please notice that even in this paragraph I've quoted you didn't check and see you'd spelt Access wrong. I suspect you know how to spell it. It's in the name of the forum you're using after all.

                        Other than those three posts, I don't believe there is one that doesn't include obvious errors that show spellings that are wrong and also different from where you've used the word before. IE. You simply haven't bothered to check what you've written before submitting it. That's simple carelessness. Your first question, which I deleted, was so poor it was gibberish. IE. Even trying to guess what you meant was impossible because it was so full of sloppily-written words, as well as words together that made no sense.

                        Please understand that it's you that suffers from such an attitude. I can delete your posts all day long without distress. Other members though, will look at what you post and feel insulted, because what's clear to me is pretty clear to everyone else too. I delete them to protect them from having to see posts with such an attitude. Otherwise, my fear is that they will decide not to come back and help others here. We don't want to allow badly-behaved members to put off our valuable experts from continuing to participate.

                        All that said, your latest three posts seem better. If you can continue to deal with others in a positive and productive way (as you appear to be doing now) in all your future dealings then everyone can be happy. I sincerely hope that this is the last time I have to deal with you as a problem, and look forward to helping you properly, as that's the real reason we're all here.

                        Comment

                        • ijared
                          New Member
                          • May 2018
                          • 25

                          #13
                          Hi,

                          After binding the textbox everything worked fine and thanks for reminding me of this simple option.

                          Regards
                          ijared
                          Last edited by NeoPa; Jun 1 '18, 12:05 PM. Reason: Removed new question.

                          Comment

                          • NeoPa
                            Recognized Expert Moderator MVP
                            • Oct 2006
                            • 32645

                            #14
                            Here's a new rule to stumble over. I suspect quite innocently. Only one question is allowed per thread.

                            This is to ensure that the forum works better for you as well as all the others that may benefit from the answers you get to your problems.

                            So, please simply repost your new question, but in a new and separate thread.

                            I've also slightly adjusted the wording in your post so that it expresses your thoughts better in English, as I understand that's not your first language.

                            Now, all that's left for this thread is for you to select one of Twinny's posts as The Best Answer. I'd do it for you myself but I'm a little confused as to what went where etc.

                            Comment

                            Working...