ش | ی | د | س | چ | پ | ج |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
تمام برداشت ها از سایت های خارجی جهت آموزش شما دوستان مبتدی اخذشده،نایاب هستند لذا نهایت استفاده را ببرید.
We are looking to make changes
select * from products where productid in(
(select val(lastt) as lastt from (select distinct dlast('ProductId','products',"supplierId=" & [SupplierId]) as Lastt,supplierid from products
order by supplierid)))
ProductID | ProductName | SupplierID | CategoryID | Unit | Price |
---|---|---|---|---|---|
3 | Aniseed Syrup | 1 | 2 | 12 - 550 ml bottles | 10 |
8 | Northwoods Cranberry Sauce | 3 | 2 | 12 - 12 oz jars | 40 |
12 | Queso Manchego La Pastora | 5 | 4 | 10 - 500 g pkgs. | 38 |
15 | Genen Shouyu | 6 | 2 | 24 - 250 ml bottles | 15.5 |
23 | Tunnbröd | 9 | 5 | 12 - 250 g pkgs. | 9 |
24 | Guaraná Fantástica | 10 | 1 | 12 - 355 ml cans | 4.5 |
27 | Schoggi Schokolade | 11 | 3 | 100 - 100 g pieces | 43.9 |
30 | Nord-Ost Matjeshering | 13 | 8 | 10 - 200 g glasses | 25.89 |
39 | Chartreuse verte | 18 | 1 | 750 cc per bottle | 18 |
41 | Jack's New England Clam Chowder | 19 | 8 | 12 - 12 oz cans | 9.65 |
44 | Gula Malacca | 20 | 2 | 20 - 2 kg bags | 19.45 |
46 | Spegesild | 21 |
استفاده از عبارت Last
select * from products where productid in(select lLast from (select distinct last([productId]) As lLast,supplierid from products group by supplierid order by supplierid))
Or
select * from products where productid in(select distinct last([productId]) As lLast from products group by supplierid)
select * from products where productid in(select distinct last([productId])-1 As lLast from products group by supplierid)
select * from products where productid in(select distinct first([productId]) As ifirst from products group by supplierid)
first-and-lastfunction-in-ms-access
کد نویسی در اکسس با دریافت مبلغ مربوطه فقط کدهای اکسسی نه script نویسی ، پروژه پذیرفته نمی شود و فقط در حد رفع مشکل. لطفا زیر همین پست مشکل در کد نویسی جهت رفع قرار داده شود شاید سایر دوستان نیز در رفع آن کمک بنمایند.
لطفا نظرسنجی فراموش نشود.
Dim Ctl
For Each Ctl In Me.Controls
If Ctl.ControlType=acTextBox Then
Ctl=Null
End If
Next
مثال شمارش تعداد ro در رشته ی x
"X="Roturzrxro
اول در آوردن فاصله در طول رشته ی x اگر وجود داشته باشد
(""," ",Replace(x=
راه حل خیلی ساده استفاده از توابع Replace و Len
(" ","Len(x)-Len(Replace(x,"ro
طول رشته ی X میشود 10 و طول رشته در تابع Replace (جایگزینی فاصله بجای ro ) میشود 8
در نتیجه تفاضل آنها 2 میشود یعنی دو تا ro در رشته ی x وجود دارد.
اگر AutoNumber باشد که باید فیلد حذف و دوباره اضافه شود
عدم نمایش پیغام اکشن کوئری
Docmd.SetWarnings False
ریست کردن ردیف در سینگل فرم
Docmd.RunSql " Update Tbl Set Row=Row-1 Where Row>" & Me!Row
Docmd.SetWarnings True