My update function does not always work properly, especially when one of the fields is 0 or blank.How could i improve my function so that when addding wih 0 not to give 0 ?
My function is the following:
Public Function dummy()
StrSQL = " UPDATE (products1 INNER JOIN products ON...
I am very grateful for your reply and the article is so useful to me, to make the difference between the markup and the margin.On that basis will work out my query. Thank you !
How can i express the percent margin in a query? I have a field PurchasePrice and a field Salesprice. the field Purchaseprice is the price at which we buy the products and the field salesprice is the field at which we sell the products.I tried to substract the salesprice to the pruchase price...
On the basis of my query i have built a totals query as follows:
SELECT Sum(qryMargin.MarginInvoice) AS SumOfMarginInvoice, qryMargin.invoicedate
FROM qryMargin
GROUP BY qryMargin.invoicedate;
I want to break down the sum so obtained into months on the basis of the invoicedateand also to...
In my update line of my query i get the eror called undefined function.What may be the reason ? My line is :
[products].[exworks]+[offset].Nz([PackTax];0)
I want to build a query that updates the field branch4 to the field items4 and the sum obtained to divide to the field pack.My query cannot update can you help ?
Here is my query :
UPDATE products1 SET products1.branch4 = [products1].[items4]/[products1].[pack];
I am exporting all my tables with the folloiwng function:
Public Function ExportAllTablesP(DBName As String, strPassword As String) As Boolean
' call it so : ExportAllTablesP "C:\be\be.mdb", "secret"
Dim FrontDB As Database, BackDB As Database, Tbl As DAO.TableDef
Set FrontDB = CurrentDb
Set...
Can you help me? I get the error wrong type of arguments in my function as follows
Private Sub Command0_Click()
Call ANewDBWithPass("c:\BE\Lest", "secret")
End Sub
Function ANewDBWithPass(ByVal tName As String) '// adds the current date to the name of the database
Dim wsp As Workspace
Dim...
Thank you for your reply.Actually i wanted to cut short the line for a better view.Something like that :
Dim Bulk As String
Bulk = " UPDATE products SET products.office = [products].[grossprice]-[products].[grossprice]"
Dim StrSQL As String
StrSQL = Bulk * 28 / 100
CurrentDb.Execute StrSQL
End...
I want to make an update code without referring to the form
My update query reads in is sql as follows
Dim SQL As String
StrSQL = "UPDATE products SET products.new = [products].[grossprice]-[products].[grossprice]*28/100"
I want to rewrite it in the following way :
Dim Diff As String
Diff =...
I am again having problems with these damned commas, they seem never to conform to my knowledge.I tried to convert the otherwise good and working update query into an sql but i got red colours showing that Access does not accept my commas.I tried with single commas ' or with double commas """"...
I have an updatable query based on 2 queries.qryinput and qry output. I want to update a field in the table products with this result. Since the query is non updatable ,how should i proceed, can i use the dlookup function? How should it look like? My query is the following
SELECT...
I have a perfectly normal query giving the right results. but when i copy it and try to use it as sql i get red letters.May be i will have to change the commas or something ?
strsql = " SELECT products1.Productid, DLookUp("grade","products","productid = " & [productid]) AS Expr1...
I have a form with not updatable controls. Can i however delete rows in the table referring to the control clicked on the form ? For example, in my form i have a productid = 76. Could i clicking this control delete the productid = 76 from the table products1 ?
I have a calculated field in my query where one sum is substracted from another.However when there is nothing in the second field, the result is also nothing, while i want to preserve the first value
my expression in the query is : Diff: [imported]-[exported]
if i have 100 items imported and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.