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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I connect VB Program with Access

Status
Not open for further replies.

Naziem

IS-IT--Management
Jul 12, 2002
3
ZA
How do I create a Visual Basic program and have a Database
like MS Access to update my information.
Please give me a sample code or a procedure on how to to do
So.
Thank you
 
Look into ADO in the MSDN Library. The scope of your question is very large, therefore difficult to answer. The MSDN has quite a few examples. If you choose to battle wits with the witless be prepared to lose.
[machinegun][hammer]
 
I have a Relevant Text Fields, I want to link these fields
to MS Access. I Have created a ms Access file with the relevant fields. I click on Add - Form - VB Data Form Wizard. In there I selected my MS Access file. I would like
to link the Text Fields with the new form that was created
so that it gets updated in the msaccess file.
What do I do from here.

Name
Age
Title

Add
When I click on Add it must update the database
I require the code for the connection
 
Look into the Data control. It as a basic control that will allow you to move through a recordset much like you can in access. You can also bind various other controls (text boxes) together to display and update the information in the recordset.

Look into MSDN and the VB help files for examples. Thanks and Good Luck!

zemp
 
Then, on the next page, select the ADO-DataControl.
After that page, select as the recordsource, the table that you want, and the fields.
You can click on "Finish" at that point. All the fields will be bound to the data control and the datacontrol to the table.
 
hallo dear use this tips and code structure on your
"command1_click()" event

command1_click()

Dim adCon9 As New ADODB.Connection
Dim a1, a2 as string
a1=textbox1.text
a2=textbox2.text

adCon9.Execute ("INSERT INTO TABLE1 VALUES('" & trim(a1) & "', '" & Trim(a2) & "') ")

end sub


If problem persists, you may contact on "toranjeet@glide.net.in".... now injoy programming
 
How do I create a VB Program that will enable to link to
a Windows NT Application e.g. I have a problem when users print to a NT Print server , sometimes the spool gets stuck with error message Error writing to \\john\hp6p
What I do is I restart the print and the rest of the prints continue. I want to write a prgram to be able to restart the job automatically wherever there is error for a print job.


 
hey use this tips!

1. fist create a D.S.N. for your MSAccess (go to control pannel and then ODBC, and then follow the instructions).

2. now create table into your concerned access database.

3. then to add/insert data into your database use this syntax cum example:

Dim adCon9 As New ADODB.Connection
adCon9.Execute &quot;insert into <table-name> values(&quot; & <number-data> & &quot;, '&quot; & <string-data> & &quot;' &quot;

4. to update:
adCon9.Execute &quot;update <table-name> set <field-name1> = &quot; & <number-data> & &quot;, <field-name2> = '&quot; & <string-data> & &quot;' &quot;

&quot;toranjeet@glide.net.in&quot;
 
hallo dear!

first write me back that r u on LAN?
if u r on lan then check that whether u r connected to the computer on the network where the printer is attached.
and then try again to print.

basically it is your network setting problem.... may not be the programm problem.....

write me back that where is this computer &quot;\\john\&quot; is situated.... i mean whether it is your computer or someone else....

&quot;toranjeet@glide.net.in&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top