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.
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
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
hi alansidman, thank you very much for the above links . i think that i can learn a lot of things
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.
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.
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.
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.
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;
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.
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
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.