Send data from Access to another app using VBA & COM

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Please excuse my total lack of knowledge but honestly I have never touched
Access before in my life...

I have an own written (exe) application for making price quotations; it has
an automation server interface that allows one to create a price quotation
and add items to it via COM calls. Until now I only have experience of doing
this from a VBA script in Excel that transfers data from spreadsheet cells
into my application. But now I also need to create a similar VBA script for
an Access application to transfer data base fields in a similar way...

The following is the code from my Excel VBA script with some pseudo code
showing what (I think) I need do with Access:

++++

' create application server instance
Dim quoteServer As Object
Set quoteServer = CreateObject("Quotation.Server")

' create a new price quotation
Dim quote As Object
Set quote = quoteServer.CreateQuote

Dim partNo as string
Dim itemQty as string

' pseudo code: select the database
select db = database "abc"

' pseudo code: iterate thru each row of the database
For row = db.rowMin To db.rowMax

' pseudo code: get the part number
select db.row.field.name = "PartNumber"
partNo = db.row.field.value

' pseudo code: get the quantity
select db.row.field.name = "Quantity"
itemQty = db.row.field.value

If (partNo <> "") And (itemQty <> "") Then

' insert part number and quantity into quotation
quote.AddItem partNo & ";" & itemQty

End if

Next row

+++

My four specific questions are how should the real VBA code look for

1) the select db = database "abc"
2) the For row = db.rowMin to db.rowMax / Next iteration
3) the "select db.row.field.name = something" selection
4) the "something = db.field.value" assignment

Any help would be appreciated...

Regards,
AndrewFG


.



Relevant Pages

  • Re: *.* FINDFIRST + ERROR 3464 (updating tables)
    ... If you'll run through your file once, like this (pseudo code): ... > Dim rstDossiers As Recordset ... > 'MsgBox strVgl ...
    (microsoft.public.access.formscoding)
  • Re: playing with data within the databound repeater
    ... dim nameLiteral as Literal = ctype, ... MY ASP.Net tutorials ... > on the pseudo code I have below: ... > sub repeater ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how to fill a dataset using something OTHER than a SQL query?
    ... > walk through the datarows myself. ... Here's some pseudo code: ... Dim DT as New DataTable ... To bind data manually, use the ItemDataBound event. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Reading a text file makes MDB file huge
    ... file cannot be exported directly to Access database as I have to do ... I am doing the following code for this (pseudo code) ... the MDB file gets huge after this number of ... iterations. ...
    (microsoft.public.vb.database.ado)
  • Re: Help with Pseudo code
    ... > i am looking for some assistance with some pseudo code for a simple ... > I need to write a small program in pseudo code that checks a username ... > and password against records in a database. ... // Verify Username & Password ...
    (comp.programming)