i written this code but it shows some error....Code:Private Sub Form_Load() con.ConnectionString = "Provider=Microsoft.Jet.oledb.4.0;Data Source=" & App.Path & " \AirLines.mdb" con.Open rs.Open "Select * from Flight_Details order by SrNo", con, adOpenDynamic Filling Values end sub ---------------------------------------------------------- Sub Values() Dim i If rs2.State = 1 Then rs2.Close rs2.Open "Select max(SrNo) from Flight_Details ", con i = rs2.Fields(0) + 1 If rs.EOF = True Or rs.BOF = True Then If txtsr.Text < i Then MsgBox "Class Not Found", vbInformation, "Airlines" cmbclasscode.SetFocus Else End If Exit Sub End If txtsr.Text = rs.Fields(4) txtcode.Text = rs.Fields(0) txtfare.Text = rs.Fields(2) txtseats.Text = rs.Fields(3) If rs1.State = 1 Then rs1.Close rs1.Open "Select Airline_name from Airlines_Master where Aircode ='" & Mid$(rs.Fields(0), 1, 2) & "'" txtflight.Text = UCase(rs1.Fields(0)) cmbnum.Text = Mid$(rs.Fields(0), 3, 4) cmbcode.Text = Mid$(rs.Fields(0), 1, 2) If rs1.State = 1 Then rs1.Close rs1.Open "Select ClassName from Class_Master where ClassCode='" & rs.Fields(1) & "'", con If rs1.EOF = True Or rs1.BOF = True Then MsgBox "No Records To Display", vbInformation, "Airlines" Exit Sub End If cmbclasscode.Text = UCase(rs1.Fields(0))
like sub or function not defined this is the errror i got during compilation.....




Reply With Quote