Solved

Access & VB6...

Posted on 2000-05-12
3
229 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now