Need some advanced help on this one!

Hi guys,

I found a sample Access program that takes data from its database to  
generate an EDI EDIFACT ORDERS file (OrdersS93a.edi).

Here is the code:

Private Sub Command0_Click()
    Dim oEdiDoc As Fredi.ediDocument
    Dim oSchema As Fredi.ediSchema
    Dim oInterchange As Fredi.ediInterchange
    Dim oGroup As Fredi.ediGroup
    Dim oTransactionset As Fredi.ediTransactionSet
    Dim oSegment As Fredi.ediDataSegment
    
    Dim oConn As ADODB.Connection
    Dim oRsInterchange As ADODB.Recordset
    Dim oRsGroup As ADODB.Recordset
    Dim oRsTransactionSet As ADODB.Recordset
    Dim oRsPOMaster As ADODB.Recordset
    Dim oRsPODetail As ADODB.Recordset
    Dim sConn As String
    
    Dim sSefFile As String
    Dim sEdiFile As String
    Dim sPath As String

    Dim i As Integer
    Dim nCount As Integer
    Dim sEntity As String
    Dim nIndex As Integer
    Dim iItemCount As Integer
    Dim nInstance  As Integer
    Dim mInstance As String
    
    sPath = CurrentProject.Path & "\"
    
    sConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sPath & 
"genOrders.mdb"
    Set oConn = New ADODB.Connection
    oConn.Open sConn

    'The InterchangeIndex table contains information of Interchange.
    Set oRsInterchange = New ADODB.Recordset
    
    'The TransactionSetIndex table contains information of the Transaction 
Sets in the
    'Interchanges
    Set oRsTransactionSet = New ADODB.Recordset
    
    'The POMaster table contains information of the Purchase Order in the 
Transaction Set
    Set oRsPOMaster = New ADODB.Recordset
    
    'The PODetail table contains information of the detailed items of 
Purchase Orders
    Set oRsPODetail = New ADODB.Recordset
    
    sSefFile = sPath & "ORDERS_S93A.sef"
    sEdiFile = sPath & "ordersS93a.edi"
    
    Set oEdiDoc = CreateObject("Fredi.ediDocument")
    Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)
    
    oEdiDoc.SegmentTerminator = "'"
    oEdiDoc.ElementTerminator = "+"
    oEdiDoc.CompositeTerminator = ":"
    oEdiDoc.ReleaseIndicator = "?"
        
    oRsInterchange.Open "Select * from InterchangeIndex", oConn, 
adOpenDynamic, adLockOptimistic
    Do While Not oRsInterchange.EOF
        Set oInterchange = oEdiDoc.CreateInterchange("UN", "S93A")
        Set oSegment = oInterchange.GetDataSegmentHeader
        oSegment.DataElementValue(1, 1) = "UNOB"
        oSegment.DataElementValue(1, 2) = "1"
        oSegment.DataElementValue(2, 1) = oRsInterchange("SenderID").Value
        oSegment.DataElementValue(2, 2) = 
oRsInterchange("SenderID_Qlfr").Value
        oSegment.DataElementValue(2, 3) = "MFGB"
        oSegment.DataElementValue(3, 1) = oRsInterchange("ReceiverID").Value
        oSegment.DataElementValue(3, 2) = 
oRsInterchange("ReceiverID_Qlfr").Value
        oSegment.DataElementValue(3, 3) = "ROUTE ADDR"
        oSegment.DataElementValue(4, 1) = "970101"
        oSegment.DataElementValue(4, 2) = "1230"
        oSegment.DataElementValue(5) = 
oRsInterchange("InterchangeControlNo").Value
        oSegment.DataElementValue(7) = oRsInterchange("Application").Value
        oSegment.DataElementValue(11) = "1"
        
        oRsTransactionSet.Open "Select * from TransactionSetIndex where 
InterchangeKey = " & oRsInterchange("InterchangeKey").Value, oConn, 
adOpenDynamic, adLockOptimistic
        Do While Not oRsTransactionSet.EOF
            Set oTransactionset = oInterchange.CreateTransactionSet("ORDERS")
            Set oSegment = oTransactionset.GetDataSegmentHeader
            oSegment.DataElementValue(1) = 
oRsTransactionSet("MessageRefNo").Value
            oSegment.DataElementValue(2, 1) = 
oRsTransactionSet("MessageType").Value
            oSegment.DataElementValue(2, 2) = 
oRsTransactionSet("MessageVersion").Value
            oSegment.DataElementValue(2, 3) = 
oRsTransactionSet("MessageRelease").Value
            oSegment.DataElementValue(2, 4) = "UN"
            oSegment.Last
            
            oRsPOMaster.Open "Select * from POMaster where TsKey = " & 
oRsTransactionSet("TsKey").Value, oConn, adOpenDynamic, adLockOptimistic
            Do While Not oRsPOMaster.EOF
                Set oSegment = oTransactionset.CreateDataSegment("BGM")
                oSegment.DataElementValue(1, 1) = "221"
                oSegment.DataElementValue(2) = oRsPOMaster("PONumber").Value
                oSegment.DataElementValue(3) = "9"
                
                Set oSegment = oTransactionset.CreateDataSegment("DTM")
                oSegment.DataElementValue(1, 1) = "4"
                oSegment.DataElementValue(1, 2) = oRsPOMaster("PODate").Value
                oSegment.DataElementValue(1, 3) = "102"
                
                Set oSegment = oTransactionset.CreateDataSegment("DTM(2)")
                oSegment.DataElementValue(1, 1) = "3"
                oSegment.DataElementValue(1, 2) = oRsPOMaster("InvDate").Value
                oSegment.DataElementValue(1, 3) = "102"

                Set oSegment = oTransactionset.CreateDataSegment("NAD(1)\NAD")
                oSegment.DataElementValue(1) = "BY"
                oSegment.DataElementValue(2, 1) = oRsPOMaster("BuyerId").Value
                oSegment.DataElementValue(2, 3) = "92"
                oSegment.DataElementValue(4, 1) = 
oRsPOMaster("BuyerName").Value
                
                Set oSegment = oTransactionset.CreateDataSegment("NAD(2)\NAD")
                oSegment.DataElementValue(1) = "BT"
                oSegment.DataElementValue(2, 1) = 
oRsPOMaster("BillToID").Value
                oSegment.DataElementValue(2, 3) = "92"
                oSegment.DataElementValue(4, 1) = 
oRsPOMaster("BillToName").Value
                oSegment.DataElementValue(5, 1) = 
oRsPOMaster("BillToAddress").Value
                oSegment.DataElementValue(6) = oRsPOMaster("BillToCity").Value
                oSegment.DataElementValue(7) = 
oRsPOMaster("BillToState").Value
                oSegment.DataElementValue(8) = oRsPOMaster("BillToZip").Value

                Set oSegment = 
oTransactionset.CreateDataSegment("NAD(2)\CTA\CTA")
                oSegment.DataElementValue(1) = "PD"
                
                Set oSegment = 
oTransactionset.CreateDataSegment("NAD(2)\CTA\COM")
                oSegment.DataElementValue(1, 1) = 
oRsPOMaster("BillToPhone").Value
                oSegment.DataElementValue(1, 2) = "TE"
                
                Set oSegment = oTransactionset.CreateDataSegment("NAD(3)\NAD")
                oSegment.DataElementValue(1) = "ST"
                oSegment.DataElementValue(2, 1) = 
oRsPOMaster("ShipToID").Value
                oSegment.DataElementValue(2, 3) = "92"
                oSegment.DataElementValue(4, 1) = 
oRsPOMaster("ShipToName").Value
                oSegment.DataElementValue(5, 1) = 
oRsPOMaster("ShipToAddress").Value
                oSegment.DataElementValue(6) = oRsPOMaster("ShipToCity").Value
                oSegment.DataElementValue(7) = 
oRsPOMaster("ShipToState").Value
                oSegment.DataElementValue(8) = oRsPOMaster("ShipToZip").Value
                
                Set oSegment = 
oTransactionset.CreateDataSegment("NAD(3)\CTA\CTA")
                oSegment.DataElementValue(1) = "DL"
                
                Set oSegment = 
oTransactionset.CreateDataSegment("NAD(3)\CTA\COM")
                oSegment.DataElementValue(1, 1) = 
oRsPOMaster("ShipToPhone").Value
                oSegment.DataElementValue(1, 2) = "TE"
                
                oRsPODetail.Open "Select * from PODetail where PoMasterKey = 
" & oRsPOMaster("PoMasterKey").Value, oConn, adOpenDynamic, adLockOptimistic
                nInstance = 0
                Do While Not oRsPODetail.EOF
                    nInstance = nInstance + 1
                    mInstance = Trim(Str(nInstance))
                    Set oSegment = oTransactionset.CreateDataSegment("LIN(" 
& mInstance & ")\LIN")
                    oSegment.DataElementValue(1) = mInstance
                    oSegment.DataElementValue(3, 1) = 
oRsPODetail.Fields("LineNo")
                    oSegment.DataElementValue(3, 2) = "IN"
                
                    Set oSegment = oTransactionset.CreateDataSegment("LIN(" 
& mInstance & ")\IMD")
                    oSegment.DataElementValue(1) = "F"
                    oSegment.DataElementValue(2) = "8"
                    oSegment.DataElementValue(3, 3) = 
oRsPODetail.Fields("Description")
                    
                    Set oSegment = oTransactionset.CreateDataSegment("LIN(" 
& mInstance & ")\QTY")
                    oSegment.DataElementValue(1, 1) = "21"
                    oSegment.DataElementValue(1, 2) = 
oRsPODetail.Fields("Quantity")
                    oSegment.DataElementValue(1, 3) = "EA"
                    
                    Set oSegment = oTransactionset.CreateDataSegment("LIN(" 
& mInstance & ")\MOA")
                    oSegment.DataElementValue(1, 1) = "146"
                    oSegment.DataElementValue(1, 2) = 
oRsPODetail.Fields("UnitPrice")
                    
                    mInstance = mInstance + 1
                    oRsPODetail.MoveNext
                Loop
                oRsPODetail.Close
                
                Set oSegment = oTransactionset.CreateDataSegment("UNS")
                oSegment.DataElementValue(1) = "S"
                
                'Total lines amount
                Set oSegment = oTransactionset.CreateDataSegment("MOA")
                oSegment.DataElementValue(1, 1) = "79"
                oSegment.DataElementValue(1, 2) = 
oRsPOMaster("ItemsAmount").Value
            
                'Other charges
                Set oSegment = oTransactionset.CreateDataSegment("MOA(2)")
                oSegment.DataElementValue(1, 1) = "104"
                oSegment.DataElementValue(1, 2) = 
oRsPOMaster("ShippingCharges").Value
                
                'Tax amount
                Set oSegment = oTransactionset.CreateDataSegment("MOA(3)")
                oSegment.DataElementValue(1, 1) = "124"
                oSegment.DataElementValue(1, 2) = oRsPOMaster("Taxes").Value
                
                'Total amount
                Set oSegment = oTransactionset.CreateDataSegment("MOA(4)")
                oSegment.DataElementValue(1, 1) = "128"
                oSegment.DataElementValue(1, 2) = 
oRsPOMaster("TotalAmount").Value
                
                oRsPOMaster.MoveNext
            Loop
            oRsPOMaster.Close
            
            oRsTransactionSet.MoveNext
        Loop
        oRsTransactionSet.Close
        
        oRsInterchange.MoveNext
    Loop
    oRsInterchange.Close
    
    oEdiDoc.Save sEdiFile
    
    MsgBox ("Done")

End Sub


I get following error though when I run it :

Run-time error '13':
Type mismatch

 and the following line gets highlighted:

  Set oEdiDoc = CreateObject("Fredi.ediDocument")

Thanks in advance for the help!






0
Utf
11/21/2009 9:47:01 PM
access 16762 articles. 3 followers. Follow

5 Replies
1176 Views

Similar Articles

[PageSpeed] 0

Fredi is probably an ActiveX control (or  COM/DCOM component, they are 
closely related) that must be installed on your computer if you want to 
instanciate it.  A quick search with Google indicate that this is probably 
part of the EDI Framework but I'm not sure:

http://www.edidev.com/menuevaluate.htm

-- 
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server 
(French)


"Earl.AKA J.Alladien in access forum!!" 
<EarlAKAJAlladieninaccessforum@discussions.microsoft.com> wrote in message 
news:5806DA1B-CC49-4911-B107-B091B0EFCEBC@microsoft.com...
> Hi guys,
>
> I found a sample Access program that takes data from its database to
> generate an EDI EDIFACT ORDERS file (OrdersS93a.edi).
>
> Here is the code:
>
> Private Sub Command0_Click()
>    Dim oEdiDoc As Fredi.ediDocument
>    Dim oSchema As Fredi.ediSchema
>    Dim oInterchange As Fredi.ediInterchange
>    Dim oGroup As Fredi.ediGroup
>    Dim oTransactionset As Fredi.ediTransactionSet
>    Dim oSegment As Fredi.ediDataSegment
>
>    Dim oConn As ADODB.Connection
>    Dim oRsInterchange As ADODB.Recordset
>    Dim oRsGroup As ADODB.Recordset
>    Dim oRsTransactionSet As ADODB.Recordset
>    Dim oRsPOMaster As ADODB.Recordset
>    Dim oRsPODetail As ADODB.Recordset
>    Dim sConn As String
>
>    Dim sSefFile As String
>    Dim sEdiFile As String
>    Dim sPath As String
>
>    Dim i As Integer
>    Dim nCount As Integer
>    Dim sEntity As String
>    Dim nIndex As Integer
>    Dim iItemCount As Integer
>    Dim nInstance  As Integer
>    Dim mInstance As String
>
>    sPath = CurrentProject.Path & "\"
>
>    sConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sPath &
> "genOrders.mdb"
>    Set oConn = New ADODB.Connection
>    oConn.Open sConn
>
>    'The InterchangeIndex table contains information of Interchange.
>    Set oRsInterchange = New ADODB.Recordset
>
>    'The TransactionSetIndex table contains information of the Transaction
> Sets in the
>    'Interchanges
>    Set oRsTransactionSet = New ADODB.Recordset
>
>    'The POMaster table contains information of the Purchase Order in the
> Transaction Set
>    Set oRsPOMaster = New ADODB.Recordset
>
>    'The PODetail table contains information of the detailed items of
> Purchase Orders
>    Set oRsPODetail = New ADODB.Recordset
>
>    sSefFile = sPath & "ORDERS_S93A.sef"
>    sEdiFile = sPath & "ordersS93a.edi"
>
>    Set oEdiDoc = CreateObject("Fredi.ediDocument")
>    Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)
>
>    oEdiDoc.SegmentTerminator = "'"
>    oEdiDoc.ElementTerminator = "+"
>    oEdiDoc.CompositeTerminator = ":"
>    oEdiDoc.ReleaseIndicator = "?"
>
>    oRsInterchange.Open "Select * from InterchangeIndex", oConn,
> adOpenDynamic, adLockOptimistic
>    Do While Not oRsInterchange.EOF
>        Set oInterchange = oEdiDoc.CreateInterchange("UN", "S93A")
>        Set oSegment = oInterchange.GetDataSegmentHeader
>        oSegment.DataElementValue(1, 1) = "UNOB"
>        oSegment.DataElementValue(1, 2) = "1"
>        oSegment.DataElementValue(2, 1) = oRsInterchange("SenderID").Value
>        oSegment.DataElementValue(2, 2) =
> oRsInterchange("SenderID_Qlfr").Value
>        oSegment.DataElementValue(2, 3) = "MFGB"
>        oSegment.DataElementValue(3, 1) = 
> oRsInterchange("ReceiverID").Value
>        oSegment.DataElementValue(3, 2) =
> oRsInterchange("ReceiverID_Qlfr").Value
>        oSegment.DataElementValue(3, 3) = "ROUTE ADDR"
>        oSegment.DataElementValue(4, 1) = "970101"
>        oSegment.DataElementValue(4, 2) = "1230"
>        oSegment.DataElementValue(5) =
> oRsInterchange("InterchangeControlNo").Value
>        oSegment.DataElementValue(7) = oRsInterchange("Application").Value
>        oSegment.DataElementValue(11) = "1"
>
>        oRsTransactionSet.Open "Select * from TransactionSetIndex where
> InterchangeKey = " & oRsInterchange("InterchangeKey").Value, oConn,
> adOpenDynamic, adLockOptimistic
>        Do While Not oRsTransactionSet.EOF
>            Set oTransactionset = 
> oInterchange.CreateTransactionSet("ORDERS")
>            Set oSegment = oTransactionset.GetDataSegmentHeader
>            oSegment.DataElementValue(1) =
> oRsTransactionSet("MessageRefNo").Value
>            oSegment.DataElementValue(2, 1) =
> oRsTransactionSet("MessageType").Value
>            oSegment.DataElementValue(2, 2) =
> oRsTransactionSet("MessageVersion").Value
>            oSegment.DataElementValue(2, 3) =
> oRsTransactionSet("MessageRelease").Value
>            oSegment.DataElementValue(2, 4) = "UN"
>            oSegment.Last
>
>            oRsPOMaster.Open "Select * from POMaster where TsKey = " &
> oRsTransactionSet("TsKey").Value, oConn, adOpenDynamic, adLockOptimistic
>            Do While Not oRsPOMaster.EOF
>                Set oSegment = oTransactionset.CreateDataSegment("BGM")
>                oSegment.DataElementValue(1, 1) = "221"
>                oSegment.DataElementValue(2) = 
> oRsPOMaster("PONumber").Value
>                oSegment.DataElementValue(3) = "9"
>
>                Set oSegment = oTransactionset.CreateDataSegment("DTM")
>                oSegment.DataElementValue(1, 1) = "4"
>                oSegment.DataElementValue(1, 2) = 
> oRsPOMaster("PODate").Value
>                oSegment.DataElementValue(1, 3) = "102"
>
>                Set oSegment = oTransactionset.CreateDataSegment("DTM(2)")
>                oSegment.DataElementValue(1, 1) = "3"
>                oSegment.DataElementValue(1, 2) = 
> oRsPOMaster("InvDate").Value
>                oSegment.DataElementValue(1, 3) = "102"
>
>                Set oSegment = 
> oTransactionset.CreateDataSegment("NAD(1)\NAD")
>                oSegment.DataElementValue(1) = "BY"
>                oSegment.DataElementValue(2, 1) = 
> oRsPOMaster("BuyerId").Value
>                oSegment.DataElementValue(2, 3) = "92"
>                oSegment.DataElementValue(4, 1) =
> oRsPOMaster("BuyerName").Value
>
>                Set oSegment = 
> oTransactionset.CreateDataSegment("NAD(2)\NAD")
>                oSegment.DataElementValue(1) = "BT"
>                oSegment.DataElementValue(2, 1) =
> oRsPOMaster("BillToID").Value
>                oSegment.DataElementValue(2, 3) = "92"
>                oSegment.DataElementValue(4, 1) =
> oRsPOMaster("BillToName").Value
>                oSegment.DataElementValue(5, 1) =
> oRsPOMaster("BillToAddress").Value
>                oSegment.DataElementValue(6) = 
> oRsPOMaster("BillToCity").Value
>                oSegment.DataElementValue(7) =
> oRsPOMaster("BillToState").Value
>                oSegment.DataElementValue(8) = 
> oRsPOMaster("BillToZip").Value
>
>                Set oSegment =
> oTransactionset.CreateDataSegment("NAD(2)\CTA\CTA")
>                oSegment.DataElementValue(1) = "PD"
>
>                Set oSegment =
> oTransactionset.CreateDataSegment("NAD(2)\CTA\COM")
>                oSegment.DataElementValue(1, 1) =
> oRsPOMaster("BillToPhone").Value
>                oSegment.DataElementValue(1, 2) = "TE"
>
>                Set oSegment = 
> oTransactionset.CreateDataSegment("NAD(3)\NAD")
>                oSegment.DataElementValue(1) = "ST"
>                oSegment.DataElementValue(2, 1) =
> oRsPOMaster("ShipToID").Value
>                oSegment.DataElementValue(2, 3) = "92"
>                oSegment.DataElementValue(4, 1) =
> oRsPOMaster("ShipToName").Value
>                oSegment.DataElementValue(5, 1) =
> oRsPOMaster("ShipToAddress").Value
>                oSegment.DataElementValue(6) = 
> oRsPOMaster("ShipToCity").Value
>                oSegment.DataElementValue(7) =
> oRsPOMaster("ShipToState").Value
>                oSegment.DataElementValue(8) = 
> oRsPOMaster("ShipToZip").Value
>
>                Set oSegment =
> oTransactionset.CreateDataSegment("NAD(3)\CTA\CTA")
>                oSegment.DataElementValue(1) = "DL"
>
>                Set oSegment =
> oTransactionset.CreateDataSegment("NAD(3)\CTA\COM")
>                oSegment.DataElementValue(1, 1) =
> oRsPOMaster("ShipToPhone").Value
>                oSegment.DataElementValue(1, 2) = "TE"
>
>                oRsPODetail.Open "Select * from PODetail where PoMasterKey 
> =
> " & oRsPOMaster("PoMasterKey").Value, oConn, adOpenDynamic, 
> adLockOptimistic
>                nInstance = 0
>                Do While Not oRsPODetail.EOF
>                    nInstance = nInstance + 1
>                    mInstance = Trim(Str(nInstance))
>                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> & mInstance & ")\LIN")
>                    oSegment.DataElementValue(1) = mInstance
>                    oSegment.DataElementValue(3, 1) =
> oRsPODetail.Fields("LineNo")
>                    oSegment.DataElementValue(3, 2) = "IN"
>
>                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> & mInstance & ")\IMD")
>                    oSegment.DataElementValue(1) = "F"
>                    oSegment.DataElementValue(2) = "8"
>                    oSegment.DataElementValue(3, 3) =
> oRsPODetail.Fields("Description")
>
>                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> & mInstance & ")\QTY")
>                    oSegment.DataElementValue(1, 1) = "21"
>                    oSegment.DataElementValue(1, 2) =
> oRsPODetail.Fields("Quantity")
>                    oSegment.DataElementValue(1, 3) = "EA"
>
>                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> & mInstance & ")\MOA")
>                    oSegment.DataElementValue(1, 1) = "146"
>                    oSegment.DataElementValue(1, 2) =
> oRsPODetail.Fields("UnitPrice")
>
>                    mInstance = mInstance + 1
>                    oRsPODetail.MoveNext
>                Loop
>                oRsPODetail.Close
>
>                Set oSegment = oTransactionset.CreateDataSegment("UNS")
>                oSegment.DataElementValue(1) = "S"
>
>                'Total lines amount
>                Set oSegment = oTransactionset.CreateDataSegment("MOA")
>                oSegment.DataElementValue(1, 1) = "79"
>                oSegment.DataElementValue(1, 2) =
> oRsPOMaster("ItemsAmount").Value
>
>                'Other charges
>                Set oSegment = oTransactionset.CreateDataSegment("MOA(2)")
>                oSegment.DataElementValue(1, 1) = "104"
>                oSegment.DataElementValue(1, 2) =
> oRsPOMaster("ShippingCharges").Value
>
>                'Tax amount
>                Set oSegment = oTransactionset.CreateDataSegment("MOA(3)")
>                oSegment.DataElementValue(1, 1) = "124"
>                oSegment.DataElementValue(1, 2) = 
> oRsPOMaster("Taxes").Value
>
>                'Total amount
>                Set oSegment = oTransactionset.CreateDataSegment("MOA(4)")
>                oSegment.DataElementValue(1, 1) = "128"
>                oSegment.DataElementValue(1, 2) =
> oRsPOMaster("TotalAmount").Value
>
>                oRsPOMaster.MoveNext
>            Loop
>            oRsPOMaster.Close
>
>            oRsTransactionSet.MoveNext
>        Loop
>        oRsTransactionSet.Close
>
>        oRsInterchange.MoveNext
>    Loop
>    oRsInterchange.Close
>
>    oEdiDoc.Save sEdiFile
>
>    MsgBox ("Done")
>
> End Sub
>
>
> I get following error though when I run it :
>
> Run-time error '13':
> Type mismatch
>
> and the following line gets highlighted:
>
>  Set oEdiDoc = CreateObject("Fredi.ediDocument")
>
> Thanks in advance for the help!
>
>
>
>
>
> 


0
Sylvain
11/21/2009 11:29:59 PM
Hi Sylvain,

Just so you know I did install the EDI framework, and the DB I downloaded 
comes in 2 files one that generates from ACCESS to an EDI, and one that 
translates an EDI into ACCESS, the last one works fine,...al references are 
also set,so there is no problem there!



"Sylvain Lafontaine" wrote:

> Fredi is probably an ActiveX control (or  COM/DCOM component, they are 
> closely related) that must be installed on your computer if you want to 
> instanciate it.  A quick search with Google indicate that this is probably 
> part of the EDI Framework but I'm not sure:
> 
> http://www.edidev.com/menuevaluate.htm
> 
> -- 
> Sylvain Lafontaine, ing.
> MVP - Windows Live Platform
> Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
> Independent consultant and remote programming for Access and SQL-Server 
> (French)
> 
> 
> "Earl.AKA J.Alladien in access forum!!" 
> <EarlAKAJAlladieninaccessforum@discussions.microsoft.com> wrote in message 
> news:5806DA1B-CC49-4911-B107-B091B0EFCEBC@microsoft.com...
> > Hi guys,
> >
> > I found a sample Access program that takes data from its database to
> > generate an EDI EDIFACT ORDERS file (OrdersS93a.edi).
> >
> > Here is the code:
> >
> > Private Sub Command0_Click()
> >    Dim oEdiDoc As Fredi.ediDocument
> >    Dim oSchema As Fredi.ediSchema
> >    Dim oInterchange As Fredi.ediInterchange
> >    Dim oGroup As Fredi.ediGroup
> >    Dim oTransactionset As Fredi.ediTransactionSet
> >    Dim oSegment As Fredi.ediDataSegment
> >
> >    Dim oConn As ADODB.Connection
> >    Dim oRsInterchange As ADODB.Recordset
> >    Dim oRsGroup As ADODB.Recordset
> >    Dim oRsTransactionSet As ADODB.Recordset
> >    Dim oRsPOMaster As ADODB.Recordset
> >    Dim oRsPODetail As ADODB.Recordset
> >    Dim sConn As String
> >
> >    Dim sSefFile As String
> >    Dim sEdiFile As String
> >    Dim sPath As String
> >
> >    Dim i As Integer
> >    Dim nCount As Integer
> >    Dim sEntity As String
> >    Dim nIndex As Integer
> >    Dim iItemCount As Integer
> >    Dim nInstance  As Integer
> >    Dim mInstance As String
> >
> >    sPath = CurrentProject.Path & "\"
> >
> >    sConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & sPath &
> > "genOrders.mdb"
> >    Set oConn = New ADODB.Connection
> >    oConn.Open sConn
> >
> >    'The InterchangeIndex table contains information of Interchange.
> >    Set oRsInterchange = New ADODB.Recordset
> >
> >    'The TransactionSetIndex table contains information of the Transaction
> > Sets in the
> >    'Interchanges
> >    Set oRsTransactionSet = New ADODB.Recordset
> >
> >    'The POMaster table contains information of the Purchase Order in the
> > Transaction Set
> >    Set oRsPOMaster = New ADODB.Recordset
> >
> >    'The PODetail table contains information of the detailed items of
> > Purchase Orders
> >    Set oRsPODetail = New ADODB.Recordset
> >
> >    sSefFile = sPath & "ORDERS_S93A.sef"
> >    sEdiFile = sPath & "ordersS93a.edi"
> >
> >    Set oEdiDoc = CreateObject("Fredi.ediDocument")
> >    Set oSchema = oEdiDoc.LoadSchema(sSefFile, 0)
> >
> >    oEdiDoc.SegmentTerminator = "'"
> >    oEdiDoc.ElementTerminator = "+"
> >    oEdiDoc.CompositeTerminator = ":"
> >    oEdiDoc.ReleaseIndicator = "?"
> >
> >    oRsInterchange.Open "Select * from InterchangeIndex", oConn,
> > adOpenDynamic, adLockOptimistic
> >    Do While Not oRsInterchange.EOF
> >        Set oInterchange = oEdiDoc.CreateInterchange("UN", "S93A")
> >        Set oSegment = oInterchange.GetDataSegmentHeader
> >        oSegment.DataElementValue(1, 1) = "UNOB"
> >        oSegment.DataElementValue(1, 2) = "1"
> >        oSegment.DataElementValue(2, 1) = oRsInterchange("SenderID").Value
> >        oSegment.DataElementValue(2, 2) =
> > oRsInterchange("SenderID_Qlfr").Value
> >        oSegment.DataElementValue(2, 3) = "MFGB"
> >        oSegment.DataElementValue(3, 1) = 
> > oRsInterchange("ReceiverID").Value
> >        oSegment.DataElementValue(3, 2) =
> > oRsInterchange("ReceiverID_Qlfr").Value
> >        oSegment.DataElementValue(3, 3) = "ROUTE ADDR"
> >        oSegment.DataElementValue(4, 1) = "970101"
> >        oSegment.DataElementValue(4, 2) = "1230"
> >        oSegment.DataElementValue(5) =
> > oRsInterchange("InterchangeControlNo").Value
> >        oSegment.DataElementValue(7) = oRsInterchange("Application").Value
> >        oSegment.DataElementValue(11) = "1"
> >
> >        oRsTransactionSet.Open "Select * from TransactionSetIndex where
> > InterchangeKey = " & oRsInterchange("InterchangeKey").Value, oConn,
> > adOpenDynamic, adLockOptimistic
> >        Do While Not oRsTransactionSet.EOF
> >            Set oTransactionset = 
> > oInterchange.CreateTransactionSet("ORDERS")
> >            Set oSegment = oTransactionset.GetDataSegmentHeader
> >            oSegment.DataElementValue(1) =
> > oRsTransactionSet("MessageRefNo").Value
> >            oSegment.DataElementValue(2, 1) =
> > oRsTransactionSet("MessageType").Value
> >            oSegment.DataElementValue(2, 2) =
> > oRsTransactionSet("MessageVersion").Value
> >            oSegment.DataElementValue(2, 3) =
> > oRsTransactionSet("MessageRelease").Value
> >            oSegment.DataElementValue(2, 4) = "UN"
> >            oSegment.Last
> >
> >            oRsPOMaster.Open "Select * from POMaster where TsKey = " &
> > oRsTransactionSet("TsKey").Value, oConn, adOpenDynamic, adLockOptimistic
> >            Do While Not oRsPOMaster.EOF
> >                Set oSegment = oTransactionset.CreateDataSegment("BGM")
> >                oSegment.DataElementValue(1, 1) = "221"
> >                oSegment.DataElementValue(2) = 
> > oRsPOMaster("PONumber").Value
> >                oSegment.DataElementValue(3) = "9"
> >
> >                Set oSegment = oTransactionset.CreateDataSegment("DTM")
> >                oSegment.DataElementValue(1, 1) = "4"
> >                oSegment.DataElementValue(1, 2) = 
> > oRsPOMaster("PODate").Value
> >                oSegment.DataElementValue(1, 3) = "102"
> >
> >                Set oSegment = oTransactionset.CreateDataSegment("DTM(2)")
> >                oSegment.DataElementValue(1, 1) = "3"
> >                oSegment.DataElementValue(1, 2) = 
> > oRsPOMaster("InvDate").Value
> >                oSegment.DataElementValue(1, 3) = "102"
> >
> >                Set oSegment = 
> > oTransactionset.CreateDataSegment("NAD(1)\NAD")
> >                oSegment.DataElementValue(1) = "BY"
> >                oSegment.DataElementValue(2, 1) = 
> > oRsPOMaster("BuyerId").Value
> >                oSegment.DataElementValue(2, 3) = "92"
> >                oSegment.DataElementValue(4, 1) =
> > oRsPOMaster("BuyerName").Value
> >
> >                Set oSegment = 
> > oTransactionset.CreateDataSegment("NAD(2)\NAD")
> >                oSegment.DataElementValue(1) = "BT"
> >                oSegment.DataElementValue(2, 1) =
> > oRsPOMaster("BillToID").Value
> >                oSegment.DataElementValue(2, 3) = "92"
> >                oSegment.DataElementValue(4, 1) =
> > oRsPOMaster("BillToName").Value
> >                oSegment.DataElementValue(5, 1) =
> > oRsPOMaster("BillToAddress").Value
> >                oSegment.DataElementValue(6) = 
> > oRsPOMaster("BillToCity").Value
> >                oSegment.DataElementValue(7) =
> > oRsPOMaster("BillToState").Value
> >                oSegment.DataElementValue(8) = 
> > oRsPOMaster("BillToZip").Value
> >
> >                Set oSegment =
> > oTransactionset.CreateDataSegment("NAD(2)\CTA\CTA")
> >                oSegment.DataElementValue(1) = "PD"
> >
> >                Set oSegment =
> > oTransactionset.CreateDataSegment("NAD(2)\CTA\COM")
> >                oSegment.DataElementValue(1, 1) =
> > oRsPOMaster("BillToPhone").Value
> >                oSegment.DataElementValue(1, 2) = "TE"
> >
> >                Set oSegment = 
> > oTransactionset.CreateDataSegment("NAD(3)\NAD")
> >                oSegment.DataElementValue(1) = "ST"
> >                oSegment.DataElementValue(2, 1) =
> > oRsPOMaster("ShipToID").Value
> >                oSegment.DataElementValue(2, 3) = "92"
> >                oSegment.DataElementValue(4, 1) =
> > oRsPOMaster("ShipToName").Value
> >                oSegment.DataElementValue(5, 1) =
> > oRsPOMaster("ShipToAddress").Value
> >                oSegment.DataElementValue(6) = 
> > oRsPOMaster("ShipToCity").Value
> >                oSegment.DataElementValue(7) =
> > oRsPOMaster("ShipToState").Value
> >                oSegment.DataElementValue(8) = 
> > oRsPOMaster("ShipToZip").Value
> >
> >                Set oSegment =
> > oTransactionset.CreateDataSegment("NAD(3)\CTA\CTA")
> >                oSegment.DataElementValue(1) = "DL"
> >
> >                Set oSegment =
> > oTransactionset.CreateDataSegment("NAD(3)\CTA\COM")
> >                oSegment.DataElementValue(1, 1) =
> > oRsPOMaster("ShipToPhone").Value
> >                oSegment.DataElementValue(1, 2) = "TE"
> >
> >                oRsPODetail.Open "Select * from PODetail where PoMasterKey 
> > =
> > " & oRsPOMaster("PoMasterKey").Value, oConn, adOpenDynamic, 
> > adLockOptimistic
> >                nInstance = 0
> >                Do While Not oRsPODetail.EOF
> >                    nInstance = nInstance + 1
> >                    mInstance = Trim(Str(nInstance))
> >                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> > & mInstance & ")\LIN")
> >                    oSegment.DataElementValue(1) = mInstance
> >                    oSegment.DataElementValue(3, 1) =
> > oRsPODetail.Fields("LineNo")
> >                    oSegment.DataElementValue(3, 2) = "IN"
> >
> >                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> > & mInstance & ")\IMD")
> >                    oSegment.DataElementValue(1) = "F"
> >                    oSegment.DataElementValue(2) = "8"
> >                    oSegment.DataElementValue(3, 3) =
> > oRsPODetail.Fields("Description")
> >
> >                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> > & mInstance & ")\QTY")
> >                    oSegment.DataElementValue(1, 1) = "21"
> >                    oSegment.DataElementValue(1, 2) =
> > oRsPODetail.Fields("Quantity")
> >                    oSegment.DataElementValue(1, 3) = "EA"
> >
> >                    Set oSegment = oTransactionset.CreateDataSegment("LIN("
> > & mInstance & ")\MOA")
> >                    oSegment.DataElementValue(1, 1) = "146"
> >                    oSegment.DataElementValue(1, 2) =
> > oRsPODetail.Fields("UnitPrice")
> >
> >                    mInstance = mInstance + 1
> >                    oRsPODetail.MoveNext
> >                Loop
> >                oRsPODetail.Close
> >
> >                Set oSegment = oTransactionset.CreateDataSegment("UNS")
> >                oSegment.DataElementValue(1) = "S"
> >
> >                'Total lines amount
> >                Set oSegment = oTransactionset.CreateDataSegment("MOA")
> >                oSegment.DataElementValue(1, 1) = "79"
> >                oSegment.DataElementValue(1, 2) =
> > oRsPOMaster("ItemsAmount").Value
> >
> >                'Other charges
> >                Set oSegment = oTransactionset.CreateDataSegment("MOA(2)")
> >                oSegment.DataElementValue(1, 1) = "104"
> >                oSegment.DataElementValue(1, 2) =
> > oRsPOMaster("ShippingCharges").Value
> >
> >                'Tax amount
> >                Set oSegment = oTransactionset.CreateDataSegment("MOA(3)")
> >                oSegment.DataElementValue(1, 1) = "124"
> >                oSegment.DataElementValue(1, 2) = 
> > oRsPOMaster("Taxes").Value
> >
> >                'Total amount
> >                Set oSegment = oTransactionset.CreateDataSegment("MOA(4)")
> >                oSegment.DataElementValue(1, 1) = "128"
> >                oSegment.DataElementValue(1, 2) =
> > oRsPOMaster("TotalAmount").Value
> >
> >                oRsPOMaster.MoveNext
> >            Loop
> >            oRsPOMaster.Close
> >
> >            oRsTransactionSet.MoveNext
> >        Loop
> >        oRsTransactionSet.Close
> >
> >        oRsInterchange.MoveNext
> >    Loop
> >    oRsInterchange.Close
> >
> >    oEdiDoc.Save sEdiFile
> >
> >    MsgBox ("Done")
> >
> > End Sub
> >
> >
> > I get following error though when I run it :
> >
0
Utf
11/22/2009 11:41:01 AM
"Earl.AKA J.Alladien in access forum!!" 
<EarlAKAJAlladieninaccessforum@discussions.microsoft.com> wrote in message 
news:3B935416-3132-4450-9940-4BDE9F5B4DD3@microsoft.com...
> Hi Sylvain,
>
> Just so you know I did install the EDI framework, and the DB I downloaded
> comes in 2 files one that generates from ACCESS to an EDI, and one that
> translates an EDI into ACCESS, the last one works fine,...al references 
> are
> also set,so there is no problem there!

First, you should have given this information in the first place.

You should also explain if in the second file, the � Set oEdiDoc = 
CreateObject("Fredi.ediDocument") � is working properly or if they isn't any 
of them.

If you are in the situation where the instruction � Set oEdiDoc = 
CreateObject("Fredi.ediDocument") � works in one file but not in another, 
then maybe the second file is corrupted or is partially wrongly compiled or 
the references are not set correctly.

The first thing to do would be to fully decompile the faulty file and then 
launch a full compilation from the Debug menu:

1- Open the References window from the VBA editor.

2- Add a dummy reference.

3- Close the References windows (Important!)

4- Reopen the References windows and remove the dummy reference (optional).

Now that the references has changed, Access will flag all modules as beeing 
of need to be recompiled.  Launch the Recompile All Modules from the Debug 
menu of the VBA editor.

Alternatively, create a windows shortcut with the following startup options:

/decompile /compact /repair

Another thing to try would be to use late binding instead of early binding: 
replace the instruction � Dim oEdiDoc As Fredi.ediDocument � with � Dim 
oEdiDoc As Object � or maybe even simply as a variant: � Dim oEdiDoc �

-- 
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server 
(French)



0
Sylvain
11/22/2009 5:49:44 PM
Hi Sylvain,

First of all I'd like to thank you for helping me ofcourse,

And after performing the "dummy" procedure it now works, so thanks a lot !!

Thanks again for your wisdom and advise!

"Sylvain Lafontaine" wrote:

> "Earl.AKA J.Alladien in access forum!!" 
> <EarlAKAJAlladieninaccessforum@discussions.microsoft.com> wrote in message 
> news:3B935416-3132-4450-9940-4BDE9F5B4DD3@microsoft.com...
> > Hi Sylvain,
> >
> > Just so you know I did install the EDI framework, and the DB I downloaded
> > comes in 2 files one that generates from ACCESS to an EDI, and one that
> > translates an EDI into ACCESS, the last one works fine,...al references 
> > are
> > also set,so there is no problem there!
> 
> First, you should have given this information in the first place.
> 
> You should also explain if in the second file, the « Set oEdiDoc = 
> CreateObject("Fredi.ediDocument") » is working properly or if they isn't any 
> of them.
> 
> If you are in the situation where the instruction « Set oEdiDoc = 
> CreateObject("Fredi.ediDocument") » works in one file but not in another, 
> then maybe the second file is corrupted or is partially wrongly compiled or 
> the references are not set correctly.
> 
> The first thing to do would be to fully decompile the faulty file and then 
> launch a full compilation from the Debug menu:
> 
> 1- Open the References window from the VBA editor.
> 
> 2- Add a dummy reference.
> 
> 3- Close the References windows (Important!)
> 
> 4- Reopen the References windows and remove the dummy reference (optional).
> 
> Now that the references has changed, Access will flag all modules as beeing 
> of need to be recompiled.  Launch the Recompile All Modules from the Debug 
> menu of the VBA editor.
> 
> Alternatively, create a windows shortcut with the following startup options:
> 
> /decompile /compact /repair
> 
> Another thing to try would be to use late binding instead of early binding: 
> replace the instruction « Dim oEdiDoc As Fredi.ediDocument » with « Dim 
> oEdiDoc As Object » or maybe even simply as a variant: « Dim oEdiDoc »
> 
> -- 
> Sylvain Lafontaine, ing.
> MVP - Windows Live Platform
> Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
> Independent consultant and remote programming for Access and SQL-Server 
> (French)
> 
> 
> 
> .
> 
0
Utf
11/23/2009 6:02:02 PM
You should perform this step everytime there is a big change in Windows (new 
service pack, new version of Office, etc.) or when you are copying the MDFB 
file to another machine; especially if the target machine doesn't have the 
same version of Windows and Office.

-- 
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server 
(French)


"Earl.AKA J.Alladien in access forum!!" 
<EarlAKAJAlladieninaccessforum@discussions.microsoft.com> wrote in message 
news:71AEC330-2DF1-4DCA-9177-BAE31A16CDC7@microsoft.com...
> Hi Sylvain,
>
> First of all I'd like to thank you for helping me ofcourse,
>
> And after performing the "dummy" procedure it now works, so thanks a lot 
> !!
>
> Thanks again for your wisdom and advise!
>
> "Sylvain Lafontaine" wrote:
>
>> "Earl.AKA J.Alladien in access forum!!"
>> <EarlAKAJAlladieninaccessforum@discussions.microsoft.com> wrote in 
>> message
>> news:3B935416-3132-4450-9940-4BDE9F5B4DD3@microsoft.com...
>> > Hi Sylvain,
>> >
>> > Just so you know I did install the EDI framework, and the DB I 
>> > downloaded
>> > comes in 2 files one that generates from ACCESS to an EDI, and one that
>> > translates an EDI into ACCESS, the last one works fine,...al references
>> > are
>> > also set,so there is no problem there!
>>
>> First, you should have given this information in the first place.
>>
>> You should also explain if in the second file, the � Set oEdiDoc =
>> CreateObject("Fredi.ediDocument") � is working properly or if they isn't 
>> any
>> of them.
>>
>> If you are in the situation where the instruction � Set oEdiDoc =
>> CreateObject("Fredi.ediDocument") � works in one file but not in another,
>> then maybe the second file is corrupted or is partially wrongly compiled 
>> or
>> the references are not set correctly.
>>
>> The first thing to do would be to fully decompile the faulty file and 
>> then
>> launch a full compilation from the Debug menu:
>>
>> 1- Open the References window from the VBA editor.
>>
>> 2- Add a dummy reference.
>>
>> 3- Close the References windows (Important!)
>>
>> 4- Reopen the References windows and remove the dummy reference 
>> (optional).
>>
>> Now that the references has changed, Access will flag all modules as 
>> beeing
>> of need to be recompiled.  Launch the Recompile All Modules from the 
>> Debug
>> menu of the VBA editor.
>>
>> Alternatively, create a windows shortcut with the following startup 
>> options:
>>
>> /decompile /compact /repair
>>
>> Another thing to try would be to use late binding instead of early 
>> binding:
>> replace the instruction � Dim oEdiDoc As Fredi.ediDocument � with � Dim
>> oEdiDoc As Object � or maybe even simply as a variant: � Dim oEdiDoc �
>>
>> -- 
>> Sylvain Lafontaine, ing.
>> MVP - Windows Live Platform
>> Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
>> Independent consultant and remote programming for Access and SQL-Server
>> (French)
>>
>>
>>
>> .
>> 


0
Sylvain
11/23/2009 6:54:02 PM
Reply:

Similar Artilces:

send the same e-mail with one or two fields changed.......
I would like to send the same e-mail to many differnet people with one or two fields changed (for example the name of recipient and the date).How canthis be done?? I would also like to be able to save the e-mail and use it again and again. can anyone help cheers john If you have Word installed and it's the same version as Outlook (both 2003, for example), you can do a mail merge between the two. This would allow you to set up the text the way you want it to, and you can save the document for future use. Look at the following page for further information: http://www.slipstick.com/con...

if cell is text move left one column
ColB is a long list with sections names followed by category codes I need to move the text into colA leaving colB with codes only (all numbers) ColB. Doors 940590 555998 447006 447008 810697 810705 810706 810707 Windows 619435 525691 525692 Try Sub Macro1() Dim lngRow As Long For lngRow = 1 To Cells(Rows.Count, "B").End(xlUp).Row If Not IsNumeric(Range("B" & lngRow)) Then Range("A" & lngRow).Value = Range("B" & lngRow).Text Range("B" & lngRow).Value = "" End If Next End Sub -- Jacob ...

advanced filter #6
here is the file: http://www.mytempdir.com/935740 First sorry for my english.... I have this code to insert letter "E" in column N of a sheet GAF only if the dates in column B of sheet GAF are into range DATAIN/DATAFIN use for test DATAIN=01/11/2005 DATAFIN =30/11/2005) Now, i want to use the same code to insert "E" in column N if the range of dates is naturally into range DATAIN/DATAFIN but if the value into column H is the same present into column B of sheet CORPORATE. So, insert in column "N" of sheet GAF the letter "E" in cells N2, N49, N50, N51...

office 2000 [excel] cannot open previously OK file. Help
When trying to open a Microsoft Excel Work Sheet that I had accessed modified and saved to only yesterday [Office 2000] a window pops up with: "name.xls cannot be accessed. The file may be resd-only, or you may be trying toaccess a read only location. Or, the server the document is stored on may not be responding." Older files stored on the same mediums ;HD, Flash memory or 3.5in. diskette are accessed with no problem. This is on a network drive? ...

Excel and some disappeared sheets
Anybody has the same or similar experiences : - I worked with excel file / closed as usually - new day opened and unfortunatelly some very important sheets disappeared / why ? Don=B4t know - I had about 7-9 sheets just now only 3 ones are there but not so important as another ones - the file has original size / I quickly looked into file by normal text editor only for reading and all relevant data are there, however if I open file by Excel, NO original sheets or data are there. - this file is VERY IMPORTANT for me - why happened ? Don=B4t know since I ask anybody for help Thanks in advan...

crm consultant needed asap
i am looking for a crm consultant who has a lot of experience with form customization, crm implimentation, heavy work flow, and activities. ideally someone in arizona but not required. telecommute will be considered for the right person. looking for someone for a possible 2 month (i am guessing here....) project. if you are available and have this experience please email me at j-e-f-f@mag-en-ta-tech.c-o-m (remove the -). we are looking for someone to start like next week at the latest (this message was posted 08-08-2004). This message was posted 8/4, not 8/8. And I have some swamp land in f...

Multiple domains on one Exchange server / All but one domain shows up as spam #2
I am sorry if this is on the board somewhere but I have been searching forever and havn't found a hint yet. I have multiple domains setup on my exchange server. Lets say abc.com, def.com, and hij.com. We only send email with @abc.com but can receive from any domain name. Recently we merged with another company and we brought back their email to our server, lets say xyz.com. Now I configured a new recipient on Exchange 2003, so I now have two policies. The first policy has the three original domains in it with @abc.com as the primary domain. In the second policy I have configured xyz.com t...

OL2002 Problem : HELP, SOS, MAYDAY
Hi, I have an IMAP account and OL2002 as client. I have checked for my account ( tools, send/receive settings, define send/receive groups, <my_account>, edit) download item description only. It works only the first time I start OL2002, but it does not work anymore for subsequent automatic/manual send/receive operations. Please could someone really help me ? Thank you in advance, Patrick ...

Help With Margin Formula
Hello, I need help with a margin forumla (calculated from retail). Say I have a cost of $10.00, and I need the formula to calculate a 40% margin from retail. So the retail should end up at $16.67. Not sure how to get from $10.00 to $16.66, I just know the cost and the margin I need to make. Thanks JR =A1/(100%-40%) -- Kind regards, Niek Otten "JR" <gaspower@aol.com> wrote in message news:eGszf.424$2O6.53@newssvr12.news.prodigy.com... > Hello, > I need help with a margin forumla (calculated from retail). Say I have a > cost of $10.00, and I need the formul...

GETPIVOTDATA data_field help
When I enter a reference to a cell, eg A2, as the value for the data_field item in the GETPIVOTDATA I get a #REF error. However, when I instead type the value of A2, eg 2003, manually into the GETPIVOTDATA formula, it works. Can anyone please help--I want this formula to vary based on what is in A2. Cheers This function is so variable in action, and difficult to handle, that have given it up in favour of VLOOKUP. In fact, having no problem i use with pivot tables -- Message posted from http://www.ExcelForum.com Try copying the headings from the pivot table, and pasting them into the ce...

Does any one know of a template for purchases, business card siz
I would like to be able to have a business card size card that I can punch the amount of purchase for my customers. After they make a certain amount of purchases I would collect them and they would receive a discount on their next purchase or a free item. On Sun, 7 Mar 2010 15:54:01 -0800, captured memories <captured memories@discussions.microsoft.com> wrote: >I would like to be able to have a business card size card that I can punch >the amount of purchase for my customers. After they make a certain amount of >purchases I would collect them and they would rece...

Exchange server crashed, please help....! Need to restore two priv.edb and pub.edb files into one....!
Hi Guys, I was wondering if I could get some help with the following problem we are having on our company. Here is the scenario; Our Windows NT 4.0 SP4a server running Exchange 5.5 SP4 crashed (Server 1) due to the exchange database reaching its 16 Gig's max limit. I went ahead and moved some mailboxes' e-mails to a few .pst files in order to make some space. This worked ok. Then, I decided to build another exchange server (Server 2) to moved some mailboxes and alleviate the load. Once the server was ready and configured as part of the current exchange site, I went ahead and move...

Help!!!!
I am running Exchange 5.5 on NT 4.0 sp6a. Norton Anti- virus deleted my edb.log file. I have done an on-line restore with Arcserve 2000 and now my directory service won't start. getting 1166 internal processing error. I have been to support and could find anything that helped. Thanks in advance You may want to run eseutil /mh <drive and path to your dir.edb and include the dir.edb > c:\edb.dmp. Find this file and see if your dir is also inconsistent. If so you will need to restore your dir. -- Nan Bennett (MSFT) Microsoft Exchange Support Please do not send e-mail...

Removing text from cells leaving numbers (help with function)
I need a function that will remove all text from a cell and just leav numbers. Formatting cells to number does not work. For example if I have: (Sired] Tennessee 37013 (herein I just want 37013 left. Anybody know a function to resolve this -- Message posted from http://www.ExcelForum.com The following will strip the text from the active cell and place the number in the adjcent cell one column to the left. If there are subsequent numbers in the original string you will get erroneous results. Put the cursor on the cell to be processed and run the macro. ********************************...

when opening an excel file, 2 files open (one is book1)?
When I click on an excel file, 2 excel documents open up. One document is called Book1 and the other document is the actual document that I want to open. How do I stop this from happening? Brian To prevent Book1 from opening you can append /e to your shortcut for opening Excel. "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\EXCEL.EXE" /e Alternative to the above............ Go to Start>Settings>Folder>Options>File Types. Scroll down to MS Excel Worksheet. Then if running Win98 OS Edit> select "Open" and Edit. If using WinXP OS you would scroll down to...

Duplicating one Field from One table to Another
Hi - I have two tables - one position, one personnel - which has a 1-to-many relationship (1 position record to many personnel records). The department had a new requirement which made it necessary to change some coding (I inherited this). I'm using tab forms so that when a position is pulled up, you can click on the tab that has the personnel information (if there is any). There is a button on the Personnel form that allows the user to add a new Personnel record. Since I am using an Auto-number field in the Position table (which doubles as the PK) the functionality is fine. Wh...

I really need help with a formview problem
I have a formview that I place a toolbar onto. In my OnInitialUpdate(), after I create the toolbar, I say GetParentFrame()->RecalcLayout(); ResizeParentToFit(FALSE); ResizeParentToFit(TRUE); The formview is still not sized properly. It looks like the problem is the toolbar on the top of the formview. It is not being taken into account in sizing the formview. The difference at the bottom of the form that is not displayed is the size of the toolbar. Any suggestions? Should work if your toolbar was created (and docked) back in your CMainFrame::OnCreate() method. ----- William Gower ...

Bank One Download is not working
We are trying to download transaction data directly from Bank One and the file is not being recognized by Money - i.e. the Bank One website states that the download is complete, but Money does not recognize it. Note that a file is being saved on our hard drive but we can't figure out how to read it. It is entitled mnyimprt.exe-(numerous numbers and letters follow). In microsoft.public.money, Miki wrote: >We are trying to download transaction data directly from >Bank One and the file is not being recognized by Money - >i.e. the Bank One website states that the downloa...

Combining Several Worksheet into one
I have over 30 excel worksheets that are: 1. Password protected 2. The sheet is also password protected 3. Each worksheet contains only one tab call "All" and this tab is in the same format and contains the same column in every sheet. 4. It's located in the same folder I need to write a macro that will open all these workbook in this folder and combine the data into one new sheet with only one tab called "All". I am able to write the code to open all the workbook but am having a difficult time figuring out how to copy only the cells with data into the new workbook...

help #2
Hi, I need help with the following: I need to plot a 2-D column graph comparing the profit margin (y-axis) for the 3 items (x-axis) for Malaysia and Singapore, using the data below; Malaysia Item Mfr's Agent's Retailer's Selling GST Profit Total Cost Charge Markup Price Margin Lipstick 9.85 15.76 12.81 38.42 1.54 27.03 105.40 Toner 11.90 19.04 15.47 46.41 1.86 32.65 127.33 Cleanser 15.90 25.44 20.67 62.01 2.48 43.63 170.13 Total 37.65 60.24 48.95 146.84 5.87 103.31 402.86 Singapore Item Mfr's Agent's Retailer's Selling GST...

problem opening up program/file
Hello, All. I am having some trouble opening up Word. It was working okay until I loaded some fonts to FontBook. Okay, now I removed all my fonts but I still get this error message about corrupt fonts I have on my computer. When I open Word, I see the blue starting-up window: Word:Mac 2004. Right underneath the product ID #, I see that it is initiating... when it gets to the point "Optimizing font menu performance" I start getting this error windows popping up one after another. (E.g. The font M TimesSmallText is corrupt and should be removed.) I keep on clicking okay for a whole lot...

Credit Card Downloading HELP!
I had 2005 and this worked ok but not on 2006. I download my 20 credit card transactions in QIF format. Money says it has 20 to review so I click that and they simply do not appear in the register! The the heck?!? I've tried quite a few things already to no avail. Deleted history and temp, deleted the statement and previous transactions/statements, repaired my money file a few times, tried to import in a different file but it just doesn't show up. Suggestions please...tia In microsoft.public.money, lucas.allen@gmail.com wrote: >I had 2005 and this worked ok but not on 2006....

Errror Help: character ' ', hexadecimal value 0x2 is illegal in xml documents
what does this error mean? how can i fix this? thanks, raj * raj wrote in microsoft.public.dotnet.xml: >what does this error mean? how can i fix this? You have an octet 0x02 or perhaps a character reference &#x02; in the document. This is not allowed in XML 1.0; the latter is allowed in XML 1.1 but your version of the .NET framework probably does not support that, and most likely you have not declared this version either. In other words, your document includes random binary data and is there- fore not an XML document. You have to correct the document before you can successfully...

mail gateway help
we have barracuda for our mail firewall but you can send mail out through it. Where do you normally point your exchange server to send mail out? the internet router the pix firewall ? "=?Utf-8?B?RWRkaWU=?=" <Eddie@discussions.microsoft.com> wrote in news:EF923D10-571B-42D0-85E3-D45CB9FC2A1C@microsoft.com: > we have barracuda for our mail firewall but you can send mail out > through it. Where do you normally point your exchange server to send > mail out? the internet router the pix firewall ? > What exactly is your question? What version of exchange are you us...

Where is "Help" located in 2007?
I cannot find the "Help" section in Word 2007. Where can I find it? Thank you! Click the question mark ? top right of the Word window or press F1 which is the universal help call. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "Todd" <Todd@discussion...