25-10-17, 12:32 AM
(25-10-17, 12:17 AM)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
وشكراً لك أخي السندباد وجزاك الله عنا خيراً ( select داخل select) ]دائماً اعجز عندها
لكن باقي مشكلة ظهور كود الصنف بشكل معكوس داخل DataGrid Child
