Computing.Net > Forums > Office Software > Excel VBA and Access communication

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel VBA and Access communication

Reply to Message Icon

Name: MartyDean
Date: June 6, 2005 at 13:24:22 Pacific
OS: Windows XP Pro
CPU/Ram: 3.8 / 1g
Comment:

I am new to VBA, I am trying to use text boxes to input data into and retrieve data from an Access Database. I am not having any success. Here is the coding I have so far. Try not to laugh :\

Private Sub cmdEnter_Click()
Dim txtFig As Integer
Dim txtItem As Integer
Dim txtPart As String
Dim txtGrove As String
Dim txtUnitPrice As Integer
Workbooks("Sheet2").Activate
Cells(2, "E").Value = txtFig
Cells(4, "E").Value = txtItem
Cells(6, "E").Value = txtPart
Cells(8, "E").Value = txtGrove
Cells(10, "E").Value = txtUnitPrice

End Sub

From here I have become lost, probally because I am trying to teach myself. Any help or hints would be greatly appreciated.

Reguards,
Marty



Sponsored Link
Ads by Google

Response Number 1
Name: MartyDean
Date: June 6, 2005 at 13:36:09 Pacific
Reply:

I also have figured out how to import external data ( the access database I created ) though I do not know how to add new entries into the database itself, or display the data I import by using search parameters I am trying to define in the text boxes. Being txtItem, txtPart, txtFig and so forth.

Reguards,
Marty


0

Response Number 2
Name: Grok Lobster
Date: June 8, 2005 at 15:41:35 Pacific
Reply:

You have to open an instance of Access from Excel VBA and then open the database to make your changes.
You should get a book on VBA if you don't have one already. John Walkenbach and John Green both have excellent ones widely available.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel VBA and Access communication

COM & LPT Communication - Excel VBA www.computing.net/answers/office/com-amp-lpt-communication-excel-vba/3875.html

Excel VBA conditional copy/paste www.computing.net/answers/office/excel-vba-conditional-copypaste/9518.html

Excel queries www.computing.net/answers/office/excel-queries/4870.html