|
-
Aug 8th, 2002, 12:17 PM
#1
Thread Starter
New Member
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
-
Aug 8th, 2002, 12:38 PM
#2
PowerPoster
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
-
Aug 8th, 2002, 12:44 PM
#3
Addicted Member
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......
 ]
-
Aug 8th, 2002, 12:49 PM
#4
Thread Starter
New Member
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
-
Aug 8th, 2002, 12:55 PM
#5
Addicted Member
try something like this...
VB Code:
Recordset.Open SQLStatement, connection, , , adCmdText
If Not (Recordset.BOF And Recordset.EOF) Then
Do Until recordset.EOF
With listbox1 ' Or Combo1
.AddItem Recordset.Fields("Whatever")
End With
Recordset.MoveNext
Loop
End If
There's only Three kinds of people in this world.....
Those that know how to count, and those that do not......
 ]
-
Aug 8th, 2002, 12:56 PM
#6
PowerPoster
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
-
Aug 8th, 2002, 01:03 PM
#7
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|