Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: peljo
  • Content: Threads
  • Order by date
  1. peljo

    addition with 0

    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...
  2. peljo

    calculator on the form ?

    Does anybody know some referemce how to build a simple calculator on the form ?
  3. peljo

    percentage

    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...
  4. peljo

    Months query

    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...
  5. peljo

    Update problem

    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)
  6. peljo

    update query

    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];
  7. peljo

    Send to a pass protected db

    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...
  8. peljo

    Wrong number of arguments

    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...
  9. peljo

    updating

    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 =...
  10. peljo

    update query

    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 """"...
  11. peljo

    Update query

    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...
  12. peljo

    error in code

    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...
  13. peljo

    move to command

    On opening the form, i want to give a command with Move To command to move to the right upper corner. Is there any such command ?
  14. peljo

    delete ith DLookup

    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 ?
  15. peljo

    substracting in query

    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...
  16. peljo

    rename a control

    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
  17. peljo

    delete from combo box

    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...
  18. peljo

    link to the desktops

    Can i create a link by code to the destops of different computers having a path in the main computer for example "C:\ Mansions \ dorns.mdb
  19. peljo

    no data in reports

    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...
  20. peljo

    Union query

    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...

Part and Inventory Search

Back
Top