Results 1 to 4 of 4
  1. #1
    JohnnyDepp is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    2

    Find the total Sale based on if there is Product added and make field visible after clicking button


    Hi!
    Currently I am working on a form where when I click the add button the 2nd row and 3rd row will become visible. Initially the 2nd row and 3rd row is invisible by changing it in the properties. And also the total will only be calculated if the row is visible. How do I make row 2 and row 3 invisible first and make it visible after clicking the add button? When you click the Add button, row 2 will be visible and then when you click it again row 3 will become visible and so on
    Click image for larger version. 

Name:	Product.JPG 
Views:	6 
Size:	26.0 KB 
ID:	28006
    For example: If I only have 2 rows then, the total would be 9 only for Year 1 and 6 for year 2. I've used the expression builder in the control source for both the textbox total Sale(txtYear1 and txtYear2). I wrote =(Val([txt_1])+Val([txt_2])+Val([txt_3]) which the result I got is 11. What if I want to let row 3 empty? I tried it but it does not show the total. It will only appear if I do 3 of them.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Welcome to the forum.

    Most Access/database developers would start with a description of the business, then design the tables and relationships.
    It appears you are starting with a form and referencing rows which tends to be a spreadsheet/Excel approach.
    More info on what you're doing in plain English might get you more focused responses.
    Good luck

  3. #3
    JohnnyDepp is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    2
    This would be just an example. I just made that so that it would be easy to understand and then I can apply it to what I want to do.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Not enough info, and honestly, if your examples are too loosely based on reality, it scares us off. Nothing worse than spending time providing a solution only to find that the data types/structure/relationships are not even close to the example, which usually means we wouldn't have made the suggestion(s). Why posters assume we can't understand the real thing is puzzling.

    How do I make row 2 and row 3 invisible first and make it visible after clicking the add button?
    If it's a continuous form, you cannot, but you don't say. Maybe that helps illustrate the problem with lack of information.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 08-23-2016, 05:32 PM
  2. Last purchase price of a product sale
    By EMAS in forum Queries
    Replies: 4
    Last Post: 12-22-2015, 02:01 PM
  3. Replies: 1
    Last Post: 02-27-2015, 10:01 AM
  4. Replies: 3
    Last Post: 01-18-2015, 06:05 PM
  5. Replies: 3
    Last Post: 12-11-2012, 08:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums