שימוש ב- DLOOKUP למע"מ

eyalco2

New member
שימוש ב- DLOOKUP למע"מ

שלום לכולם. אני די חדש בתחום אז אשאל כמה שאלות בהמשך ברשותכם. יש לי טופס חשבונית ובו אני מעונין להציב את המ"ע שאמור להילקח מטבלת מע"מ בטבלת מע"מ יש ID מע"מ ומע"מ עצמו (גם תאריך תחילה וסיום). איך אני משתמש בדיוק ב- DLOOKUP כדי לשלוף את המע"מ המעודכן מהטבלה? תודה.
 

ub65

New member
בהנחה שזה באקסס..

In Access, the DLookup function returns a value from a specified set of records (or domain). The syntax for the DLookup function is: DLookup ( expression, domain, [criteria] ) expression is a field, calculation, control on a form, or function that you wish to return. domain is the set of records. This can be a table or a query name. criteria is optional. It is the WHERE clause to apply to the domain. For example: Let's take a look at a simple example: DLookup("[UnitPrice]", "Order Details", "OrderID = 10248") In this example, you would be retrieving the UnitPrice field from the Order Details table where the OrderID is 10248. This is the same as the following SQL statement: SELECT UnitPrice AS Expr1 FROM [Order Details] WHERE ((([Order Details].OrderID)=10248)); You can also retrieve a calculation using the DLookup function. For example: DLookup("UnitPrice * Quantity", "Order Details", "OrderID = 10248")
 

danabona

New member
בדיוק אתמול עשיתי זאת בקוד.

Public Function Maamin(maam1 As Date) As Variant If maam1 >= #1/1/1990# And maam1 <= #6/14/2002# Then Maamin = 17 If maam1 >= #6/15/2002# And maam1 <= #2/29/2004# Then Maamin = 18 If maam1 >= #3/1/2004# And maam1 <= #8/31/2005# Then Maamin = 17 If maam1 >= #9/1/2005# And maam1 <= #6/30/2006# Then Maamin = 16.5 If maam1 >= #7/1/2006# And maam1 <= #12/31/2099# Then Maamin = 15.5 End Function
 
למעלה