Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10

    Post calculated fields dosent show in the main table

    hi guys,


    i created a form using a table. there are some fields it dose not save data in the main table.please check below print screens and give me an answer.

    01
    Click image for larger version. 

Name:	2.jpg 
Views:	20 
Size:	63.7 KB 
ID:	30994
    02
    Click image for larger version. 

Name:	3.png 
Views:	20 
Size:	21.8 KB 
ID:	30995

    03
    Click image for larger version. 

Name:	1.png 
Views:	20 
Size:	38.7 KB 
ID:	30996

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Table relationships make no sense. Tables should be linked on primary and foreign key fields.

    PacchettiTBL and Discover tables are not linked on primary and foreign key fields.

    Calculated data will not automatically save to table, requires code (macro or VBA).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10
    dear sir, thank you so much for prompt respond on this matter . im very new to Microsoft access this is my first form. please kindly can you advice how to make table relationship ( PacchettiTBL and Discover) and what codes should i put.

    thanks again
    Dhanu

  4. #4
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    As a new user to Access, here are two links that will help you to achieve proficiency.

    http://www.accessmvp.com/strive4peace/

    http://r937.com/relational.html

  5. #5
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10
    hi alansidman, thank you very much for the above links . i think that i can learn a lot of things

  6. #6
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10
    i have changed table relationship. but it dosent changed anything. maybe i have to put some codes. pls advice

    Click image for larger version. 

Name:	4.png 
Views:	15 
Size:	24.7 KB 
ID:	31004

    Click image for larger version. 

Name:	1.png 
Views:	15 
Size:	43.7 KB 
ID:	31005

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Still doesn't make sense. Why would one field (Tour_e_Escursioni) link to two lookup tables?

    Afraid you still don't grasp the basics of relational database principles.

    And since I don't understand much Italian?, I can't figure out what these tables are for.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    It may be helpful to all wanting to assist if you explained in simple English your business process. Without understanding your process, we can only guess at what you want. We are not mind readers here, so help us to help you.

  9. #9
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10
    hi, thank you very much for all keep looking on this. this form regards to tourism company. this is the main customer details form. i linked Tour_e_Escursioni (Tours and Excursions) field because when operator select it , adulto ,ragazzo,bambino fields are should automatically be filled. (i did this, by watching a YouTube video). Tour_e_Escursioni field contains main packages list and other three fields contains prices relevant to main package. and i have linked these fields using these commands,
    Adulti = Servizi_e_Escursioni.Column(2)Ragazzi = Servizi_e_Escursioni.Column(3)
    Bambini = Servizi_e_Escursioni.Column(4)

    i hope now you all can get an idea what i did.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Makes no sense to link QuotaTBL to Tour_e_Escursioni field, especially if QuotaID and PacchettiID are both autonumber fields.

    If QuotaTBL has prices for escursioni, should probably combine QuotaTBL and PacchettiTBL into one table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Join Date
    Apr 2017
    Posts
    1,681
    You have a table where company's clients are listed (DiscoverMessinaCusto..)? And a single form (i.e. a form where info about 1 client is displayed) based on this table, with another (also a single) form as subform where some info about a tour this client has booked?
    Or is this a table where a certain tour for certain client is booked and a subform with additional info for this tour? Looking at the table structure the latter may be the case!

    Let's take a look at possible business description based what I did read out from your table structures.

    You have a company which organizes tours for tourists;
    This company has several tours it is selling to clients - so you must have a table tblTours: TourID, TourName, ... (here you have all other info which is uniform for defined tour, like duration, group size limitations, etc.);

    Obviously you must have also a table where you register clients and all uniform info about them: ClientID, ForeName, LastName, ..., Language, Phone, ...;

    When the new client arrives at company to book a tour, you have to register him/her. When it is an old client, you select him/her from your database;

    The client wants to book a tour. Sou you have to register the booking somewhere. tblBookings: BookID, ClientID, TourID, BookingDate, TourDate, ...;

    The clients says, that some number of people will be participating in booked tour and gives exact number of adults, youths (?) and kids. You have to register this info also somewhere, and tblBookings isn't a right place. A next table is needed. tblParticipants: PartID, BookID, PartType (when it is sure there will always only 3 types you need to differ, then you can use values 1, 2 and 3 for PartType, when you aren't sure about this, then you also need a table where you register the different participant types), Qty;

    Now you need to calculate, how much this all will cost. When you calculate booking cost based on fixed price list for tour, then you need a table from where you read those prices. tblTourPrices: TourPriceID, TourID, PartType, Price;

    And now please say, to where in this we must place your forms?

    P.S. When you think that it will be a good idea p.e. to scrap the table tblParticipants and instead have the structure of table tblBookings: BookID, ClientID, TourID, BookingDate, TourDate, AdultQty, YouthQty, KidQty..., then try to estimate the difficulty to design formulas for tour cost, when the company decides, that at Christmas time all kids will get a rabbat, for both designs. Or what happens, when is decided, that pensioners also get their own prices;

    P.P.S. Don't include calculated values like various totals or commissions into your tables. Instead calculate them whenever you need them (in forms, reports or queries). Calculated values are in tables justified only when they are used p.e. for filtering forms or something like this;

  12. #12
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10
    i have make a new table pls check whether if this is correct. and kindly let me know the codes which i have to write to save these calculation to my main database

    Click image for larger version. 

Name:	5.png 
Views:	11 
Size:	23.2 KB 
ID:	31010

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Unless you expect the prices to change over time, there is no reason to save into Discover. Calculate the totals when needed.

    The Escursioni combobox can be multi-column. Columns have the prices. Expression in textbox references combobox column index. If price is in column 3 the index 2.

    =[Adulti] * Escursioni.Column(2)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #14
    Dhanu is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    10
    dear all thank you very much for helping on this,

    yes exactly this is a form relevant to tour company which sells tour packages to tourist.

    this is the main data-entry form.

    there are 23 packages and 3 types of price categories to each package (e.g- package name :ALCANTARA_TAORMINA , prices : adult - 60 euro, young -35 euro, kids- 0 euro )

    so i want when the user select the package(Servizi_e_Escursioni), the prices automatically generate in the relevant fields (Rdulto,Ragazzo,Bambino). (i did by using after update function. codes were - Adulto = Servizi_e_Escursioni.Column(2),Ragazzo = Servizi_e_Escursioni.Column(3),Bambino = Servizi_e_Escursioni.Column(4))

    now its working perfectly ,when user select the package, relavent price fields fill automatically and user can select how many participants to the tour and total calculation generate automatically in the totale field (i used some formulas)

    my problem is when user after entered above details these fields working perfectly in the form. but after save them i cant see those details (quota totale- total quota,commissioni -commissions,commissione euro- euro commission,netto -net price) in my main customer database (customer table) i want to save net price in my table because i have to run query to calculate revenues to particular date

    we are not interested whether customer existing or new one, impotent thing is save the all details to the table

    thanks
    dhanu

  15. #15
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Saving calculated data requires code (macro or VBA). The real trick is figuring out what event to put code in. Perhaps a button Click. If Salvare means Save, perhaps that button.

    Should give textbox a name different from field, like tbxNet.

    Me!Netto = Me.tbxNet
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 10-18-2017, 09:36 AM
  2. Replies: 5
    Last Post: 02-08-2013, 11:28 AM
  3. query show who dosent has medal3
    By mokhecen in forum Queries
    Replies: 2
    Last Post: 07-27-2012, 11:11 AM
  4. Linking tables to show primary key from main table
    By Mark_435 in forum Database Design
    Replies: 5
    Last Post: 01-12-2012, 09:20 PM
  5. Calculated date does not show in table
    By frankq in forum Forms
    Replies: 6
    Last Post: 06-23-2011, 01:31 AM

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