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...
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...
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...
Can i rename a control on the fly ? For example, if Me!Office = 6 Then Me.Branch9 = Me!Branch. Both branch9 and branch are fields in the table products
Why deletion from a combo box is not working ? I have a control in my form called productid. In the onClick event of this control i have :
Dim StrSQL As String
StrSQL = "DELETE * FROM [order details1] WHERE ProductID = " & Me!productid & ";"
CurrentDb.Execute StrSQL
When i change the control...
I am opening a report listing the sales for a given client.When however there are no sales for a given client, the report is opened indeed but it is written error and the picture is rather ugly. Could i set up some filter on opening of the report, and if there are no data,just not open the...
Will you help me built a union query ? I have 2 queries, qryinput and qryoutput.Out of these query i have a third query called qryDiff substracting these
queries. However qryDiff does not show all the goods sold, only those goods that are substracted.Therefore i want to build an union query...
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.