11-09-22, 12:00 PM
خذ هذا الكود عدل فيه حسب اسم قاعدة البيانات والجدول واسم التقرير
ولو لم يضبط معك سوف أرفع لك مثال
كود :
If Trim(TextID.Text) = "" Then
MsgBox "يجب إختيـار الاســم", vbCritical + vbMsgBoxRight + vbMsgBoxRtlReading, "تنبيــه"
TextIDI.SetFocus
Exit Sub: End If
Dim x As String
x = TextID.Text
Unload Report1
Report1.DataControl1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\Data.Base\Data_Base.mdb;Persist Security Info=False"
If RS.RecordCount <= 0 Then
MsgBox "عفــواً ... لا يوجد سجل ", vbCritical + vbMsgBoxRight + vbMsgBoxRtlReading, "تنبيــه"
TextID.SetFocus
Exit Sub: End If
Report1.DataControl1.Source = "Select * From [TBL_Student] Where [ID_Code] = '" & x & "'"
If Not Textpic.Text = "" Then
Report1.Image1.Picture = LoadPicture(Textpic.Text)
Else
Report1.Image1.Picture = LoadPicture()
End If
'Report1.LName.Caption = Form_school.Text3.Text
'Report1.Caption = " ÇÓÊãÜÇÑÉ ÈíÇäÜÇÊ ØÇáÜÜÈ" & " " & Form_documents.CombCategory.Text
'Report1.Caption = " ÇÓÊãÜÇÑÉ ÈíÇäÜÇÊ ÇáØÇáÜÜÈ : " & " " & Form_documents.Textname.Text & " * ááÕÜÜÜÝ : " & Form_documents.CombClass.Text & " * ÇáÔÚÈÜÜÜÉ : " & Form_documents.CombCClass.Text & " * ÕÝÉ ÇáÞíÏ : " & Form_documents.CombCategory.Text
'Report1.LT.Caption = " ÇÓÊãÜÇÑÉ ÈíÇäÜÇÊ ØÇáÜÜÈ" & " " & Form_documents.CombCategory.Text
Report1.Show: Report1.Visible = True: Report1.Showولو لم يضبط معك سوف أرفع لك مثال
إذا طُعِنتَ من الخلفِ فاعلمْ أنك في المقدمةِ

