ISM4113 - Business Systems Design
VBasic Code Example Using Access Database Files
You can download the "system" that illustrates how to access Access database files with VBasic code. This code is offered "as is, where is" with no guarantees expressed or implied (sort of like buying a used car!). Remember, I am not going to grade your code for syntatical neatness. I will focus on system functionality, but I will look at your code. Please feel free to clean up this code and return it to me. I will make it worth your time if you do a really good job of cleaning it up.
One of your fellow students who wishes to remain anonymous (so you can't blame him/her) has done a good job of cleaning up the code. The data objects on the forms have been removed so you don't have to worry about setting the data file paths on the forms. The data file path is set in only one place - in the module. See the comments and code. Also, I added the code in the update subroutine to display the updated record data in the main form after the update is completed.
I have put links to each of the components of the system. The entire system should work after you change the file path name in the module only. See the illustration below for how to work with the data control objects. These files have the same names as the ones you downloaded earlier, so be sure to copy them into a different directory so you don't stomp over any code you have been developing.
- NextNumb.frm - the "main" form that displays customer information
- frmAddCust.frm - the form to add customers to file
- frmUpdCust.frm - the form to update existing customer information
- NextNumb.bas - the module with the public variable declarations and the startup form specification
- NextNumb.vbp - the Visual Basic "project" file
- NextNumb.vbw - the Visual Basic "project" workspace
- test.mdb - the Access database with the Info and NextID files
Again, use this code FWIW. It is worth exactly what you are paying me for it!!!!!
Return to VBasic page