'Any helpful tips on how to accomplish this is appreciated
'How to allow for different fonts(widths)
Private Sub cmdTest
Dim sSpace As String
sBarScan = "077472006809"
'sBarScan = left(MSComm1.Input, 12)
rs.Open ("SELECT ItemDescription, Amount, TaxRate from DeptInfo where Identifier = '" & sBarScan & "'"
sSpace = Space(17 - Len(rs(0)))
If rs(2) <> "" Then sTaxRate = " Tx" & rs(2)
'trying to format text1 so that description is all the way left, allow for 16 chars,
'description, then 1 space, Then T1, then amount all the way to the right
'something like the following lines
'Left Margin(Descriptin Tax and amount across one line of text1) Right Margin
' Should look like the following line
'Dap Sealant Oils 1.89'
'you can see I've been trying various things, but nothing works well
sReadDB = Format$(rs(0), "!@@@@@@@@@@@@@@@"
sReadDB = left(sReadDB, 17)
'& sSpace & sTaxRate & vbTab & rs(1)
'sReadDB = rs(0) & sSpace & sTaxRate & vbTab & rs(1)
Text1 = Text1 & sReadDB & sTaxRate & rs(1) & vbCrLf
rs.Close
End Sub
Thanks in advance
'How to allow for different fonts(widths)
Private Sub cmdTest
Dim sSpace As String
sBarScan = "077472006809"
'sBarScan = left(MSComm1.Input, 12)
rs.Open ("SELECT ItemDescription, Amount, TaxRate from DeptInfo where Identifier = '" & sBarScan & "'"
sSpace = Space(17 - Len(rs(0)))
If rs(2) <> "" Then sTaxRate = " Tx" & rs(2)
'trying to format text1 so that description is all the way left, allow for 16 chars,
'description, then 1 space, Then T1, then amount all the way to the right
'something like the following lines
'Left Margin(Descriptin Tax and amount across one line of text1) Right Margin
' Should look like the following line
'Dap Sealant Oils 1.89'
'you can see I've been trying various things, but nothing works well
sReadDB = Format$(rs(0), "!@@@@@@@@@@@@@@@"
sReadDB = left(sReadDB, 17)
'& sSpace & sTaxRate & vbTab & rs(1)
'sReadDB = rs(0) & sSpace & sTaxRate & vbTab & rs(1)
Text1 = Text1 & sReadDB & sTaxRate & rs(1) & vbCrLf
rs.Close
End Sub
Thanks in advance