Results 1 to 7 of 7

Thread: Data Display

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    Owensboro, KY
    Posts
    3

    Data Display

    Hey there,
    I am very new to VB and have what is probably a stupid question. I have a Access 2002 DB file, and I am using it to store inventory items. What I need to have happen is for the itemtype to be displayed in a list that can be clicked on and then edited. Now, I have no idea if this is even possible, let alone if it is a smart thing to do, but this program needs to be able to be used by a little old blue haird lady, so I was hoping to have a one form for her to select the item, click an edit button and kick her to another form with the text boxes for her to edit the fields.
    Does this make sense? Let me know
    Thanks

  2. #2
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    JPMast,
    of course it possible: it's known as Data Processing type apps. The thing is there are tons of different things involved like DB access interface such DAO, ADO, ODBC, etc... Your best bet would be to stop at the local bookstore and get the simpliest book on Databse programming in Visual Basic. I and some other guys may trow in some sample code but that wouln'd help you much. You must get yourself familiar with some of the technologies I've mentioned and then it's all yours...

    Cheers, Roy

  3. #3
    Addicted Member kidlaley's Avatar
    Join Date
    Jun 2002
    Location
    California
    Posts
    159

    i did a project similar to this!!

    i had a Dummy .mdb file and i needed to create a form that will display the information of students in a MSFlexGrid that where filter by Name or By Courses!!!

    if a name was click, it will open a new form that display all the information from the student...

    all of this was read from the .mdb file, there you could delete or add classes to the student or if you wanted, you could edit any information of the student!!!!

    i used ADO to connect to the .mdb file!!!!

    worked like a charm!!!!
    There's only Three kinds of people in this world.....
    Those that know how to count, and those that do not......
    ]

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    Owensboro, KY
    Posts
    3
    Well Roy,
    I like the advice and am way ahead of you. I alread have a VB programming book and understand the concepts of the ADO, ODBC, ect. However, what I am really asking for is to be pointed in the reigt direction.
    I have the form set up, I have the connection made to the Database, I have the RS all set, but I am unable to get the data to fill either a list box or a combo box. I was wondering what the best methond for posting that would be, and then I will figure out what code is needed if someone does not supply some for me to try.
    I am not asking for someone to take me to my destination, just how to get there. If you give me a concept that I don't understand, then at least I will have a keyword to being my studies under.
    Thanks

  5. #5
    Addicted Member kidlaley's Avatar
    Join Date
    Jun 2002
    Location
    California
    Posts
    159

    try something like this...

    VB Code:
    1. Recordset.Open SQLStatement, connection, , , adCmdText
    2. If Not (Recordset.BOF And Recordset.EOF) Then
    3.     Do Until recordset.EOF
    4.         With listbox1 ' Or Combo1
    5.             .AddItem Recordset.Fields("Whatever")
    6.         End With
    7.         Recordset.MoveNext
    8.     Loop
    9. End If
    There's only Three kinds of people in this world.....
    Those that know how to count, and those that do not......
    ]

  6. #6
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    So, if you already have a Recordset (as you mention SetUp) then just loop thru it and use AddItem method of your list combo to populate it. BTW, on other forums people are usualy shown their code followed by "Here is what I'done. What's wrong or what's missing?" It just an advise. Check out DEVX.com and see the difference.

    Roy

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Location
    Owensboro, KY
    Posts
    3
    Thank you both for your help

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