الاخوة الاعزاء
استخدم adodc في عمل التقارير واستخدم الاكواد التالية في تنفيذ ذلك:
private sub form_load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" & "DataSource=" & App.Path & "db1.mdb;" & "UserID=Admin;Password=abc;"
end sub
-----------------------------------------------------
وفي زر امر الطباعة استخدم الكود:
Private Sub Command3_Click()
With Adodc1
.RecordSource = "select * from kuod where( madenno like " & Val(Text3.Text) & "and(date >= '" & Text1.Text & "'and date < '" & Text2.Text & "') or daaenno like " & Val(Text3.Text) & " and (date >= '" & Text1.Text & "'and date < '" & Text2.Text & "'))order by date"
End With
Set dr3.DataSource = Adodc1
dr3.Sections(5).Controls(12).Caption = Text7
dr3.Sections(5).Controls(10).Caption = Text6
dr3.Sections(5).Controls(11).Caption = Text5
dr3.Sections(5).Controls(14).Caption = Label1
dr3.Sections(5).Controls(13).Caption = Text14
dr3.Sections(2).Controls(7).Caption = Text3
dr3.Sections(2).Controls(5).Caption = Text4
dr3.Sections(2).Controls(1).Caption = Text2
dr3.Sections(2).Controls(2).Caption = Text1
dr3.Sections(2).Controls(3).Caption = Text9
dr3.Refresh
dr3.Show
End Sub
وعند التنفيذ تظهر الرسالة التالية ولا اعرف سببها:
can't start your application the workgroup information file is missing or opened exclusively by another user
ارجو من الاخوة شرح كيفية وضع كلمة سر قاعدة البيانات في الكود السابق وان كان الكود غير صحيح ارجو تصحيحه
ولكم جزيل الشكر
اخوكم اشرف