25-10-17, 12:17 AM
(آخر تعديل لهذه المشاركة : 25-10-17, 12:23 AM {2} بواسطة sendbad100.)
السلام عليكم
غير الكود التالي
الى التالي
غير الكود التالي
PHP كود :
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "SHAPE {Select distinct Orderin.Id as الرقم, Orderin.Indate as [تاريخ الأمر], Orderin.RefId as [المرجع], Orderin.Refdate as [تاريخ المرجع], " _
& "Orderin.Source as [الجهة الموردة], Orderin.Desc as [البيان], Orderin.PrintState as [Print], Orderin.UserId as المستخدم " _
& "From Orderin INNER JOIN Itemindetail ON Orderin.Id = Itemindetail.Id " + QryStMstr + " } AS ParentCMD APPEND ({Select Itemindetail.Id as الرقم,Itemindetail.ItemId as [كود الصنف], " _
& "Items.ItemDesc as [اسم الصنف], Itemindetail.Qty as [الكمية], Items.Unit as [الوحدة], Itemindetail.Qtychar as [الكمية بالحروف] " _
& "From Itemindetail,Items Where Items.Itemid=Itemindetail.Itemid Order by Itemindetail.ItemId} AS ChildCMD RELATE الرقم TO الرقم) AS ChildCMD", db, adOpenStatic, adLockOptimistic
الى التالي
PHP كود :
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "SHAPE {Select distinct Orderin.Id as الرقم, Orderin.Indate as [تاريخ الأمر], Orderin.RefId as [المرجع], Orderin.Refdate as [تاريخ المرجع], " _
& "Orderin.Source as [الجهة الموردة], Orderin.Desc as [البيان], Orderin.PrintState as [Print], (SELECT Users.Username FROM Users WHERE Users.UserId = Orderin.UserId ) AS [المستخدم]" _
& "From Orderin INNER JOIN Itemindetail ON Orderin.Id = Itemindetail.Id " + QryStMstr + " } AS ParentCMD APPEND ({Select Itemindetail.Id as الرقم,Itemindetail.ItemId as [كود الصنف], " _
& "Items.ItemDesc as [اسم الصنف], Itemindetail.Qty as [الكمية], Items.Unit as [الوحدة], Itemindetail.Qtychar as [الكمية بالحروف] " _
& "From Itemindetail,Items Where Items.Itemid=Itemindetail.Itemid Order by Itemindetail.ItemId} AS ChildCMD RELATE الرقم TO الرقم) AS ChildCMD", db, adOpenStatic, adLockOptimistic


