Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access a table in Microsoft Access 1

Status
Not open for further replies.

RAK

IS-IT--Management
Feb 9, 2000
22
US
I'am a new programmer and need to know what references through vb 6 Enterprise edition to access a Microsoft access data table and read a nd write to it.
 
Well you have many options.<br>
Easiest is not always the most flexible.<br>
But lets start with easy first.<br>
VB 5 & 6 have a &quot;Data Form Wizard&quot; <br>
It is not installed by default but it is easy to install.<br>
in VB design window click<br>
Add-ins then &quot;Add-in Manager&quot;<br>
look in the list for<br>
&quot;VB6 Data Form Wizard&quot;<br>
highlight it and click<br>
&quot;Loaded/unloaded&quot; check box (lower right corner)<br>
Also click &quot;Load at Starup&quot; if you want to use it everytime your in VB<br>
It will not be automatially put in every project so don't worry about that.<br>
NOW click OK<br>
If you click Add-ins again you will see a new option called &quot;Data Form Wiazard&quot;<br>
Click it<br>
It will step you though the process of connecting to any number of database's including Access.<br>
<br>
OK start with that.<br>
Come back if you have more issues with this.<br>
<br>
<br>

 
Igues I should have said I know about that one but it makes things slow. I have a access data table on the lan which I will use as storage for the program and it runs in access.
 
Dougp can I get your email address I have a question for you.
 
RAK<br>
Under project references you can use the Microsoft DAO 3.51 object library <br>
pk <p>PK Odendaal<br><a href=mailto: pko@mweb.co.za> pko@mweb.co.za</a><br><a href= > </a><br>
 
DougP<br>
<A HREF="mailto:dposton@universal1.com">dposton@universal1.com</A>
 
Well a faster one is using SQL<br>
Minimal SQL needs<br>
<br>
Dim db as database, rst as recordset, SQL as string<br>
Set db = OpenDatabase(&quot;\\SLMD\SYS\ACCESS\LEADTIME.MDB&quot;) <br>
SQL = &quot;SELECT * FROM Orders WHERE OrderDate &gt;= #1-1-95#;&quot;<br>
Set rst = db.OpenRecordset(SQL)<br>
<br>
another method Not SQL<br>
<br>
Dim MyDB As Database, MyTable As Recordset<br>
Set MyDB = OpenDatabase(&quot;\\SLMD\SYS\ACCESS\LEADTIME.MDB&quot;)<br>
Set MyTable = MyDB.OpenRecordset(&quot;LEADTIME&quot;)<br>
MyTable.Index = &quot;PrimaryKey&quot;<br>
MyTable.Seek &quot;=&quot;, Me![Project].text<br>
MyTable.Edit<br>
MyTable.fields(&quot;SYS&quot;) = Me![text1].text<br>
' update database<br>
MyTable.Update<br>
<br>
MyTable.Close<br>
MyDB.Close<br>
<br>
<br>
<br>
<br>

 
Dougp I have a question for you about the Barcode making.<br>
<br>
The other information about references helped me alot and the code help thank you people for the help. I just fond this website and like it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top