Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2004
    Posts
    90

    Unanswered: calculate on the form!!

    I have one form where has one subform inside it that show a list of quantity.I decide to use one textbox in the form to calculate the total of this list.How I might to create it so that it appear just a total. this list is come from the table.

    anyone have any idea? your suggestion is appreciated.

  2. #2
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Wink

    Quote Originally Posted by oasislah
    I have one form where has one subform inside it that show a list of quantity.I decide to use one textbox in the form to calculate the total of this list.How I might to create it so that it appear just a total. this list is come from the table.

    anyone have any idea? your suggestion is appreciated.
    Hi there,

    Sorry but have been away for a bit. Check out the sample I post here. When the form opens, just go to DesignView and look at the calculations I places in the two TextBoxes....SubTotal and GrandTotal.
    The SubTotal textbox calculates the amounts across the form (record)
    The GrandTotal calculates all of the SubTotal textboxes in this one.
    NOTE: SubTotal goes in the DetailSection of the form
    NOTE: GrandTotal goes in the FormFooter.
    Also, there is a report that does the same thing just in case you went that far after completing the form. Hope that makes it all simple for you. It's very late here....4:50 a.m., but wanted to stick my head in the door and see what was going on. Now, to bed....(yawn)

    have a good day all and see ya soon,
    Bud out....
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2004
    Posts
    90
    hello...

    thanks a lot bud coz replying me..sorry for asking again.I just follow your calculation steps based on ur attachment form and report to me but still occur an error.So here I attached my sample of form so that u and other member have any idea to help me.The problem is in form trans2.In total weight textbox is the sum of weight based on quantity release(the unit of weight picked from table product).

    Your idea is appreciated.
    Attached Files Attached Files

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by oasislah
    hello...

    thanks a lot bud coz replying me..sorry for asking again.I just follow your calculation steps based on ur attachment form and report to me but still occur an error.So here I attached my sample of form so that u and other member have any idea to help me.The problem is in form trans2.In total weight textbox is the sum of weight based on quantity release(the unit of weight picked from table product).

    Your idea is appreciated.
    Hello again,

    Check out your form now. I created the calculations for you on the same form....trans2. You didn't have the product_weight pulled into the form. Take a look at it and see how you like it. There are TextBoxes for both the Pieces and the Weight.

    have a nice day,
    Bud
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2004
    Posts
    90
    thanks a lot bud,

    Right now I can't check my form because right now I been at cyber cafe which no access installation...so tension..so maybe tomorrow i'll check it..if any question i'll ask u again my member..thank again.

  6. #6
    Join Date
    Nov 2004
    Posts
    90
    hello bud,

    tq coz try to the ideas and solve my problem. here I dont know how u add product_weight into subform? and I was try to put the code in text total qty but become an #error message..why? how u do that?please tell me..can u create the sample of report based on that form?another question is I can't make update for new record and list of new product such as I want to insert new number and related product and quantity to that number how?(I assume to create new form for update new number but still can't) - that new number cant be readed while I insert it in form trans2. thank for ur help..I'll appreciate it..If any problem with understand my problem please dont hesitate to asking me...
    Last edited by oasislah; 11-09-04 at 00:29.

  7. #7
    Join Date
    Nov 2004
    Posts
    90
    Hello bud..

    Thanks a lot for ur help..But right now I'm faced with report also..I was try to create report meny time but the calculation in the report is become an error even I follow the code/formula from form that u given to me. And another problem is the structure of report did not follow such trans2 form. For example one 'Number_' will provides a list of product related with that number.

    for more detail please view please view my report (QuerysampleReport) and 'trans2' form.

    I hope u will help me again..ur help is very2 apprecited.....
    Attached Files Attached Files
    Last edited by oasislah; 11-11-04 at 22:56.

  8. #8
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    good morning oasislah,

    Well, I finally got it done. Attached is your database. Look at the Trans2 form now. First, I placed a ComboBox on there to select the Number for you. You can either scroll for a number OR you can TYPE in a number and it will still find it for you.
    Next, I fixed your SubForm to rid it of the Horizontal Scroll bars as they are not needed.
    The Report: I created a new report for you and just take a look at it and you can then see how it was done.
    Now, just a tip in keeping things all neat. When you create objects/controls i.e. TextBoxes, CommandButtons, etc. it makes good practice to actually Name these objects and the labels as well. Especially in reports when searching for a certain control, you can check for all objects in the report in a window/box at the top left corner. IF they all have names that correspond to what they are and belong to , it will be easy to find them, rather trying to find which one is called Text51, Text103 and such. A box for the FirstName field would be easier to find it the Control itself is named: FirstName and the corresponding label for it is:lblFirstName. That way you can distinguish between the label for the Control and the actual Control. Follow me?? That holds true for forms as well, just in case someone else is trying to maintain your program behind the scenes.
    Next and foremost, Name your objects in a very Proper manner. You have a field in your table simply named Number NOT GOOD. You should define what kind of number. Phone number, Account number, Location number etc. It helps to try to keep the names as short as possible...(just saves time)KeepItSimplyShort.....lol. Like I would name ProductDescription simply that instead of Product_Description. All those underscores get a bit much at times and not really needed. Either ProductDescription or ProdDesc would be good. Just trying to pass along tips taught to me by others as well as learning on my own. Here to help you and hope you like what I did for you and can understand it.

    btw, did you read your other post about Message Boxes??? Anyway, I included one on this form trans2 on the NumberLookup ComboBox. Check it out behind the scenes. There are other ways, but that is one that I use all the time.

    have a nice day, I'm off to bed....yawwwwnnnnnnn....
    BUD
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2004
    Posts
    90
    Thank you very2 much bud,

    Hi sorry for so long not surfing coz long holiday..So I hope we can continuing to make the discussion with this situation...Your help is very2 appreciated and very good ideas gave from u...thanks again...your idea&help also lot in helping me to continue my project with easily and hope will improve my understanding this as well.....So now I just try to put another number in trans2 but that such number can't be appear it list of product (E.g; number 26279)..-and always appear the last list of number (30001) that not allow us to create new transaction..why? also will appear debug in visual basic code...its ok i'll try to find it..but if u can tell me..its will be more smoothly...thank for ur help..
    Last edited by oasislah; 11-17-04 at 21:54.

  10. #10
    Join Date
    Nov 2004
    Posts
    90
    hello all,

    anyone cal help me on how to directly go switcboard manager after we click database icon?If any ideas/suggestion please tell me....

  11. #11
    Join Date
    Nov 2004
    Posts
    90
    very good day bud,

    Your ideas to use combobox for the Number is very confortable for my situation and I'm apprecite it. But now I just try to use it list from that combobox but have an error with coding...Also if I try to put the new number, there nothing present (porduct, description and etc list) to me....It was present empty in the list.So if could detect it error please tell me, I'm also faced the problem with change report from landscape into portrait position.It because the size format at here is little bit greater than A4 size (I dont know what size is it).So if we print by using lanscape, it not enough for that paper(the size of landscape is greater then paper size)...ur help is appreciated...Right now here is 10:25 am..also time for working....
    Last edited by oasislah; 11-19-04 at 05:33.

  12. #12
    Join Date
    Nov 2004
    Posts
    90
    hello bud,

    need ur help again, right now regarding report and new function...I accept the sample report that u provide me before this but can u sort that just by portrait? I try to sort it many time but the data is greater than the page..if can I wanna ask u something on how to hide some of data in the report such as product weight. I think that not important for user to know it but just the grand weight. If that textbox in the report can be hide I think it more work..One another question is regarding sts_Bt table that has been related to table trans1. for that function is how to make 'from_warehouse' field (E.g 'HQA') will increase to 1 each time user print the report. The increasing is occur in the field name 'type_last_no_used'.

    For example if user 'from warehouse' 'AGE' equal to 6(field 'type_last_no_used') then it will become 7 for the last transaction that we make.

    please view my latest update database,password 'ess'

    If user from HQA equal to 46073 then it will equal 46074 at the last transaction if make on it.the result is in report so that user will know how many time the transaction has been made for each warehouse. I dont have idea on how to make it..If u have any idea please help me...ur help will be appreciated.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •