Solved

Access & VB6...

Posted on 2000-05-12
3
234 Views
Last Modified: 2010-05-02
I want use Access and VB6 to control databases (high losses changes and see the data) from scratch. (not is cliente/server program, is monouser)

what can I do?  any idea? pls write a skeletor source code or any web page to download code or any

Thanks for all.

regards

0
Comment
Question by:nowait
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 105 total points
ID: 2803784
nowait, the simple answer to this is "just do it". But to be a little more helpful here is an outline that should at least get you started:

Run access and create a simple table,
Run VB and choose the Data Form Wizard (it is an add-in which you may need to enable from the Tools menu) this will automatically create a form with a grid/text boxes etc and buttons to allow you to add/edit/delete records from the table.

There you have it, at least in essence. From that you can then start to build in additional tables, using the sample code created by the wizard you can see the methods used to manipulate the data and can build further complexity into that until you have a complete application.

I could provide examples of this, but it is difficult to do so well without knowing what sort of application you are trying to produce. In my opinion it is better to go for it in this way and then ask more questions as you encounter problems, or as you find that you cannot get the application to work in the way that you intend.
0
 
LVL 6

Expert Comment

by:setiawan
ID: 2803837
Hi nowait,

here is some examples using ADO

Dim objConn as New ADODB.Connection
Dim objRec as New ADODB.Recordset
Dim sql as string

ObjConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Data\db1.mdb"

sql = "Select * from confirmed where Archived=" & No
ObjRec.Open sql, objConn,2 , 1

That's it

Now, you can do some operation with recordset object

objRec.MoveFirst ' goto first rec
objRec.MoveNext  ' goto next rec
objRec.MoveLast  ' goto last rec

if you want to dispaly the result in the list box, you can do like this :

objRec.MoveFirst
do while objRec.EOF
   list1.addItem objRec.Fields("RoomID")
loop

'dont forget to close the connection and recorset object when you finished

objRec.close
objConn.close
set objRec = Nothing
set objConn = Nothing

hope this helps :)

  danny

0
 

Author Comment

by:nowait
ID: 2803860
Thanks setiawan & TimCotten
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 11 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question