Solved

Access & VB6...

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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