naxagain.blogg.se

Vb6 print to file
Vb6 print to file








vb6 print to file vb6 print to file

"WHEN EEP_EISIC = 3 THEN EEP_PERMIT END " & _ "WHEN EEP_EISIC = 2 THEN EEP_PASSPORT " & _ "WHEN EEP_EISIC = 1 THEN REPLACE(EEP_NEWIC,'- ' ,' ' ) " & _ "(SELECT EEP_SECURITYLVL, EEP_COMPANY, EEP_TYPE, EEP_NO, EEP_NAME, EEP_FACTORY, CASE WHEN EEP_EISIC = 0 THEN (CASE WHEN LEN(EEP_OLDIC) = 0 THEN ' ' WHEN LEFT(EEP_OLDIC,1) 'A ' THEN 'A ' + EEP_OLDIC ELSE EEP_OLDIC END) " & _ "FROM DMF_EISArrears (NOLOCK) RIGHT JOIN " & _ "CAST(EEP_EISNO AS NVARCHAR(9)) AS EEP_EISNO, dtjoin, dtresign " & _ "CAST(EEP_IC AS NVARCHAR(12)) AS EEP_IC, " & _ "CAST(EEP_NAME AS NVARCHAR(45)) AS EEP_NAME, " & _ "CAST((EIA_EISAMTER+EIA_EISAMTEE) * 100 AS INT) AS AMOUNT_EIS, " & _ VSQL = "SELECT ISNULL((select ead_Number from DMF_Address where ead_CompanyNo = eia_compno and ead_factory = eia_fac and ead_AddrID = ' " & sAddr & " ' ), ' ' ) AS KOD, " & _ MsgBox "Monthly Socso Arrear Files have successfully saved.", vbInformation, Me.Caption Hi! Thanks a lot! it worked! but there i think there is another problem in the code, where the error "File is already open" came up.It supposed to print 3 textfiles with data, all the 3 are printed but, only the first one has data, the rest two is empty, with the error "File is already open". Please help I have no idea on (PRINTING MULTIPLE FILES) ' Format(dtpSocsoDate, " MMyy") & rs!eep_name & Space( 45 - Len(rs!eep_name)) & _ ' rs!eep_socsono & Space(9 - Len(rs!eep_socsono)) & _ ' StrInput = rs!KOD & Space( 9 - Len(rs!KOD)) & Space( 12 - Len(rs!eep_ic)) & rs!eep_ic & _ StrStatus = IIf(strResign "", "H", strStatus) If strResign "" Then strJoinResign = strResign StrJoinResign = Left(strJoin & Space(8), 8) StrResign = IIf("" & RS1!dtresign = "", "", Format("" & RS1!dtresign, "ddMMyyyy"))

vb6 print to file

' If Dir(spath) "" Then spath = txtSocsoLoc.Text & "NOMANTH.TXT" 'MsgBox " " & tFileName, vbInformation, Me.Caption RS2.Open uSQL, Conn, adOpenStatic, adLockReadOnly RS1.Open vSQL, Conn, adOpenStatic, adLockReadOnly " SOA_PAYYEAR = " & Year(dtpSocsoDate.Value) & " AND (SOA_SOAMTEE+SOA_SOAMTER) > 0 " USQL = " SELECT soa_month FROM DMF_SocsoArrears WHERE SOA_PAYMONTH = " & Month(dtpSocsoDate.Value) & " AND " & _ VSQL = vSQL & " GROUP BY SOA_COMPNO, SOA_FAC, EEP_NAME, EEP_IC, EEP_SOCSONO, dtjoin, dtresign ORDER BY SOA_COMPNO, SOA_FAC, EEP_NAME "










Vb6 print to file