Glem det har fået det til at virke nu. således -->>>
If Data1.Recordset.EOF = True Then
Data1.Recordset.MoveFirst
End If
Dim Alleprint As String
Dim alleprintto As String
Open "bilka.eqt" For Output As #1
Open "fotex.eqt" For Output As #2
Do While Data1.Recordset.EOF = False
If Data1.Recordset("varehus") = "bilka" Then
Alleprint = Data1.Recordset("varehus") & _
" | " & Data1.Recordset("bon - nr") & _
" | " & Data1.Recordset("belob") & _
" | " & Data1.Recordset("Antal %")
Print #1, Alleprint
End If
If Data1.Recordset("varehus") = "føtex" Then
alleprintto = Data1.Recordset("varehus") & _
" | " & Data1.Recordset("bon - nr") & _
" | " & Data1.Recordset("belob") & _
" | " & Data1.Recordset("Antal %")
Print #2, alleprintto
End If
Data1.Recordset.MoveNext
Loop
Close #1
Close #2
Printer.Print
Printer.FontName = "Times New Roman"
Printer.FontSize = 12
Printer.Print "EQCWS - (Bilka og føtex medarbejder Rabat udregning) -
www.eqvaliser.com"Printer.Print ""
Printer.Print "Varehus --|-- Bon nr --|-- Beløb --|-- Procent Rabat"
Printer.Print "----------------------------------------------------------"
Dim data As String
Printer.Print
Open sti & "bilka.eqt" For Input As #1
Do While EOF(1) = False
Line Input #1, data
Printer.Print data
Loop
Close #1
Dim datan As String
Printer.Print
Open sti & "fotex.eqt" For Input As #1
Do While EOF(1) = False
Line Input #1, datan
Printer.Print datan
Loop
Close #1
Printer.EndDoc
Data1.Recordset.MoveFirst