• WSsvetljop

    WSsvetljop

    @wssvetljop

    Viewing 11 replies - 106 through 116 (of 116 total)
    Author
    Replies
    • in reply to: Is Null (Access 2000) #535044

      Thank you very much indeed for your reply.If i subtract with 0 quantities, then i receice minus values.How can i avoid that?I want to substract only when the quantity is not 0

      Best regards

    • in reply to: zero value in a table (Access 2000) #535028

      Dear Sir,
      I am afraid you are right.I am mixing up the meaning of Null and Zero.So i am trying to add from a zero or Null value and i cannot do it.In simple words, if i have no product in the warehouse, and add a new quantity, how shall i proceed with my function,and shall i put 0 in the default value of the field?
      What i want is to add a new quantity from zero in my stocks of products.
      Once again thank you very much .I hope i may solve my problem quite soon

      Best regards

    • in reply to: how to make my sql work with zero values #530545

      Yeas you are right, the initial value is Null. Is there any way on Access to avoid that?
      Best regards

    • in reply to: global DLookup function #530101

      I beg to be apologized.I am so grateful for your previous replies and you did give me a chnace to solve
      some my problems with your wonrdeful advices
      May i wish you all the best

      Best regards

    • in reply to: public update function #529873

      Dear Charlotte,

      I want to thank you to you and all other contributors to this forum for the excellent advice
      and wonderful solutions i have received.
      The update code suggested by you works wonderful and without errors. I had 4 functions before and

      now i will have one!!!
      May i ask you for some additional help? I have simplified my code because i wanted to be more

      clear and also i thought i could manage it myself.But i cant.
      Actually after the update process,which you have solved sucessfully, i have to carry our a

      deletion process as follows

      CurrentDb.Execute “DELETE * FROM [Order Details] WHERE orderid = ” & orderid & “;”
      CurrentDb.Execute “DELETE * FROM [Orders] WHERE orderid = ” & orderid & “;”

      and another function for the paymentid,if i have to delete the payments:

      CurrentDb.Execute “DELETE * FROM [Order Details] WHERE paymentid = ” & paymentid & “;”
      CurrentDb.Execute “DELETE * FROM [Orders] WHERE paymentid = ” & paymentid & “;”

      Since it may be the same Where clause i tried to put it inside but i received an
      error too few parameters.
      If i can manage to do this i will have a miracle code.Can you help?I want to do it all in one

      function.

    • in reply to: public update function #529822

      CurrentDb.Execute “UPDATE orders INNER JOIN (products INNER JOIN [order details] ON (products.Productid = [order details].ProductID) AND (products.Productid = [order details].ProductID)) ON orders.orderid = [order details].OrderID SET products.stock = products.stock+[order details].cartons WHERE orders.orderid = ” & Screen.ActiveControl & “”

      Dear Sir,
      Thank you so much for your advice.It works excellent and saves a lot of time!!!!
      No that i solved the problem, may i ask you an additionalk question,applying your solution. .I think i can further simplyfy my coding.I have two functions,they are similar ,only the Where clause is dufferent.In the first function, like the above , the diferring part of the where clause is
      WHERE orders.orderid
      in the other function the differing part of the where clause is :
      WHERE orders.paymentid

      The full second function is the following
      CurrentDb.Execute “UPDATE orders INNER JOIN (products INNER JOIN [order details] ON (products.Productid = [order details].ProductID) AND (products.Productid = [order details].ProductID)) ON orders.orderid = [order details].OrderID SET products.stock = products.stock+[order details].cartons WHERE orders.paymentid = ” & Screen.ActiveControl & “”

      So you see, the two functions are different only in that part of the where clause.Is it possbile to create a constant and then replace this constant,or something like that?
      I am very grateful to you anyway

      Please accept my best regards

    • in reply to: Calling a function from another function #528773

      Thank you very much for your precious advices.I want to express my appreciation of this site since it is niot the first time that i receive very kind and very clever suggestions.
      I want to be a bit more clear with ehat I want to do in order to help me find my mistakes.I want to open a report with a function, and on opening the report I want that
      some actions to be executed with another function.Obviously the first function should be declared as Boolean like
      ==============================
      Public Function f1(args) As Boolean
      DoCmd.OpenReport “R1”, acViewPreview
      End Function
      ===========================
      This function is triggered by the onclick event of a control on a form like this
      ======================
      Private Sub Command472_Click()
      F1 (args)
      End Sub
      ============================
      I want to use another function, which for sake of clarity I have simplified like this
      =========================
      Public Function beepit()
      DoCmd.Beep
      End Function
      ==========================
      And I want this function to be used in the OnOpen event of a report only when the function f1(args)is used, like this:
      =============================
      Private Sub Report_Open(Cancel As Integer)
      If Fc1(args) = True Then
      Beepit
      End If
      End Sub
      ==========================
      A very elegant solution but I doesn

    • in reply to: invisible control on report #525975

      Thank you for your attention. I have simplified the task.Actually i have several invisible controls on the report and they are made visible depending on the chosen mode of action, for example one control is called InvoiceNumebr and the other OrderNumber.So in case of an invoice the control InvoiceNumnber is made visible.The funny thing is that if i only wnat to open the report without printing it, i can see the control on the screen, but if add on the command to print, then the control is not seen on the screen even though that it is printed.
      Best regards
      Slav

    • in reply to: Error log on closing database #525670

      tgahnk you for the reply.I am afraid i shoudlk,s end the whole database,however i coukd zip it and it will niot be greater than 700KB. If you woukd agree to have a look pleae let me knwo w your email address.
      Once again thank you very much
      Best regards

    • in reply to: find a record in a list #523621

      Dear Sir,

      Thank you very much for your reply.What i want is by entering the order number do go directly to that order number in the list box.This is very important to
      me and i will be really grateful if you can help me.Is it possible that i send to you the zipped database?
      It will be only 100 KB.By looking in the real form you might give me some precious recommendations.If you would agree will you let me know the adress where to send

      Best regards
      P.S, becasue of some other reasons i will ned a lsit box and not a
      combo box or a subform.

    • in reply to: syntax error in update statement #519987

      Dear Sir,

      Thank you very much for your answer. I think you have given me the right answer, but somehow my code doesnt work, obvisouly my mistake is somehwere else.What i receive now is the message Too Few Parameters.Expected:2

      Will you agree to send to you my real example ina databsze, compressed with a zip file so
      to save space? i will be very grateful of you would help me because this problem is of very
      important to me

      Best regards

      Slav

    Viewing 11 replies - 106 through 116 (of 116 total)