Rasheed Shaik
Programmer
Dim obj, rs As ADODB.recordset, SQL As String
Call db_conn
Set rs = New ADODB.recordset
strString = " SELECT cusname,idnumb,mobi,pron,proc,blkno,lannum,sqland,cost,comiso,addit,deduc,gtot,vali,rename" & _
" From reser" & _
" WHERE reno = '" & Combo1.Text & "' "
rs.Open strString, DB, adOpenStatic
Set rs = DB.Execute(strString)
'With reportPS
If Not rs.EOF Then
Set Reservation.DataSource = rs.DataSource
'-----------------------------------------------------------------------------------------------'
'PageHeader
Reservation.Sections("PageHeader").Controls("lblcusname").Caption = CStr(rs!cusname)
Reservation.Sections("PageHeader").Controls("lblidnumber").Caption = CStr(rs!idnumb)
Reservation.Sections("PageHeader").Controls("lblmobile").Caption = CStr(rs!mobi)
Reservation.Sections("PageHeader").Controls("lblPron").Caption = CStr(rs!pron)
Reservation.Sections("PageHeader").Controls("lblProc").Caption = CStr(rs!proc)
Reservation.Sections("PageHeader").Controls("lblBlkno").Caption = CStr(rs!blkno)
Reservation.Sections("PageHeader").Controls("lblLn").Caption = CStr(rs!lannum)
Reservation.Sections("PageHeader").Controls("lblsql").Caption = CStr(rs!sqland)
Reservation.Sections("PageHeader").Controls("lblcost").Caption = CStr(rs!cost)
Reservation.Sections("PageHeader").Controls("lbCommi").Caption = CStr(rs!comiso)
Reservation.Sections("PageHeader").Controls("lblAdd").Caption = CStr(rs!Addit)
Reservation.Sections("PageHeader").Controls("lblDed").Caption = CStr(rs!deduc)
Reservation.Sections("PageHeader").Controls("lblGt").Caption = CStr(rs!Gtot)
Reservation.Sections("PageHeader").Controls("lblVali").Caption = CStr(rs!vali)
Reservation.Sections("PageHeader").Controls("lblrname").Caption = CStr(rs!rename)
Reservation.Sections("PageHeader").Controls("lblcname").Caption = CStr(rs!cusname)
Reservation.Sections("PageHeader").Controls("lblvali1").Caption = CStr(rs!vali)
'-----------------------------------------------------------------------------------------------'
Reservation.Refresh
Reservation.Show vbModal
End If
'End With
'For Each obj In reportPS.Sections("PageHeaders").Controls
' If TypeOf obj Is RptTextBox Then
' obj.DataMember = rs.DataMember
'End If
'Next
********
Error
Run Time Error:2147467259(80004005)
Method 'Sections' of Object 'Reservation' Failed
Call db_conn
Set rs = New ADODB.recordset
strString = " SELECT cusname,idnumb,mobi,pron,proc,blkno,lannum,sqland,cost,comiso,addit,deduc,gtot,vali,rename" & _
" From reser" & _
" WHERE reno = '" & Combo1.Text & "' "
rs.Open strString, DB, adOpenStatic
Set rs = DB.Execute(strString)
'With reportPS
If Not rs.EOF Then
Set Reservation.DataSource = rs.DataSource
'-----------------------------------------------------------------------------------------------'
'PageHeader
Reservation.Sections("PageHeader").Controls("lblcusname").Caption = CStr(rs!cusname)
Reservation.Sections("PageHeader").Controls("lblidnumber").Caption = CStr(rs!idnumb)
Reservation.Sections("PageHeader").Controls("lblmobile").Caption = CStr(rs!mobi)
Reservation.Sections("PageHeader").Controls("lblPron").Caption = CStr(rs!pron)
Reservation.Sections("PageHeader").Controls("lblProc").Caption = CStr(rs!proc)
Reservation.Sections("PageHeader").Controls("lblBlkno").Caption = CStr(rs!blkno)
Reservation.Sections("PageHeader").Controls("lblLn").Caption = CStr(rs!lannum)
Reservation.Sections("PageHeader").Controls("lblsql").Caption = CStr(rs!sqland)
Reservation.Sections("PageHeader").Controls("lblcost").Caption = CStr(rs!cost)
Reservation.Sections("PageHeader").Controls("lbCommi").Caption = CStr(rs!comiso)
Reservation.Sections("PageHeader").Controls("lblAdd").Caption = CStr(rs!Addit)
Reservation.Sections("PageHeader").Controls("lblDed").Caption = CStr(rs!deduc)
Reservation.Sections("PageHeader").Controls("lblGt").Caption = CStr(rs!Gtot)
Reservation.Sections("PageHeader").Controls("lblVali").Caption = CStr(rs!vali)
Reservation.Sections("PageHeader").Controls("lblrname").Caption = CStr(rs!rename)
Reservation.Sections("PageHeader").Controls("lblcname").Caption = CStr(rs!cusname)
Reservation.Sections("PageHeader").Controls("lblvali1").Caption = CStr(rs!vali)
'-----------------------------------------------------------------------------------------------'
Reservation.Refresh
Reservation.Show vbModal
End If
'End With
'For Each obj In reportPS.Sections("PageHeaders").Controls
' If TypeOf obj Is RptTextBox Then
' obj.DataMember = rs.DataMember
'End If
'Next
********
Error
Run Time Error:2147467259(80004005)
Method 'Sections' of Object 'Reservation' Failed