Reply

Join Date: Mar 2005
Posts: 18
Reputation: baboon4000 is an unknown quantity at this point 
Solved Threads: 0
baboon4000 baboon4000 is offline Offline
Newbie Poster

Access and VB

 
0
  #1
Mar 2nd, 2005
this is ganna sound so weired. do anyone happend to have any worksheet about access and vb, and creating database, please send me a private email on yahoo, tansk
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 71
Reputation: NewVBguy is an unknown quantity at this point 
Solved Threads: 3
NewVBguy NewVBguy is offline Offline
Junior Poster in Training

Re: er

 
0
  #2
Mar 6th, 2005
Hi,
I don't know exactly what you want to do here.
Do you want to create a database or table using vb?

If thats the case, I think you can make are reference first to ms access 8.0 if your using access97 then create an object...

It's really hard to guess but hope it gives you some help.


Newvbguy
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 238
Reputation: uniquestar is an unknown quantity at this point 
Solved Threads: 11
uniquestar's Avatar
uniquestar uniquestar is offline Offline
Daniweb Sponsor

Re: er

 
0
  #3
Mar 17th, 2005
Hi, do you wnat to just access and an "access" database using vb, or create your own in vb?
which versions are you using?
Tip of the Millenium: There is no point worrying about life, because no-one gets out alive.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 18
Reputation: Raza is an unknown quantity at this point 
Solved Threads: 0
Raza Raza is offline Offline
Newbie Poster

Re: Access and VB

 
0
  #4
Mar 22nd, 2005
Originally Posted by baboon4000
this is ganna sound so weired. do anyone happend to have any worksheet about access and vb, and creating database, please send me a private email on yahoo, tansk
its looking that u need to create database on ms access (2000) and wan to connect forms with it...u can choose ODBC (control panel --> Admins. Tools --> ODBC) and then write file source...use wizards in VB 6..it will be easier for u
kh(bye)

Raza.
hasnainr1@yahoo.co.uk
hasnainr1@hotmail.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 8
Reputation: Mohsin Khan is an unknown quantity at this point 
Solved Threads: 0
Mohsin Khan Mohsin Khan is offline Offline
Newbie Poster

Re: Access and VB

 
0
  #5
Apr 11th, 2005
First go to access and creat a database for example database name is "Test". Then creat a table having some name for example "Invoice_info", having some field according to ur requirment.
Then come on to VB6 and select VB Enterprise Control Application form place as many textboxes as u've fields in ur table.
For example ur table has 4 fields
invoice(string)
Name(String)
Date(dateandtime type)
Amount(Number)
Create 4 textboxes for each field. And 2 command buttons 1 for save the record and 1 for retreive the record.
Then past Adodc on ur VB Form. and palces these lines of code
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Test.mdb;Persist Security Info=False"
End Sub

Private Sub retrieve_Click()
Unload Form1
Load Form1
Form1.Show

Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "Invoice_info"
Adodc1.Refresh


Text1.Text = Adodc1.Recordset.Fields(0)
Text2.Text = Adodc1.Recordset.Fields(1)
Text3.Text = Adodc1.Recordset.Fields(2)
Text4.Text = Adodc1.Recordset.Fields(3)


End Sub

Private Sub save_Click()
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "Invoice_info"
Adodc1.Refresh

Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Text2.Text
Adodc1.Recordset.Fields(2) = Text3.Text
Adodc1.Recordset.Fields(3) = Val(Text4.Text)
Adodc1.Recordset.Update
Unload Form1
Load Form1
Form1.Show
End Sub

Note that the database must be at the location where the VB application is. Means the VB application and Access Data base must be in same folder.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC