This is the code I am trying to use
vb Code:
Private Sub cmdTryIt_Click() Dim strEmpFileName As String Dim strBackslash As String Dim intEmpFileNbr As Integer Dim strEmpName As String Dim intDeptNbr As Integer Dim strJobTitle As String Dim dtmHireDate As Date Dim sngHrlyRate As Single strBackslash = IIf(Right$(App.Path, 1) = "\", "", "\") strEmpFileName = App.Path & strBackslash & "EMPLOYEE.Dat" intEmpFileNbr = FreeFile Open strEmpFileName For Append As #intEmpFileNbr strEmpName = ("Enter Name (Or click Cancel to stop):") Do Until strEmpName = "" intDeptNbr = InputBox("Enter Debt:") strJobTitle = InputBox("Enter Job Title:") dtmHireDate = InputBox("Enter Hire Date:") sngHrlyRate = InputBox("Enter Hourly Rate:") Write #intDeptNbr, strEmpName, strJobTitle, dtmHireDate, sngHrlyRate, Print strEmpName; _ Tab(25); Format$(intDebtNbr, "@@@@"); _ Tab(35); strJobTitle; _ Tab(60); Format$(intDebtNbr, "mm/dd/yyyy); _ Tab(71); Format$(Format$(sngHrlyRate, "Standard"), "@@@@@@@") strEmpName = InputBox("Enter name (or click Cancel to stop):") Loop Close #impEmpFileNbr End Sub
WHenever I try to run the program error pops up, I receive a syntax error. Can anyone help me understand why I keep getting an error?




Reply With Quote
