15. februar 2003 - 21:17Der er
15 kommentarer og 1 løsning
Hjælp ønskes til en shop
Jeg har leget lidt med kreation af en CDShop men sidder nu lidt fast med det essentielle skema;
Skemaet "Oders" er mit hovedskema hvor ordre bliver registreret, hovedskemaet består af kunde information og information omkring levering etc. ikke noget problem der, men problemet kommer egenligt i underskemaet. Der henter den information fra tabellen "Order Details", hvor der vælges Produkt, hvor mange enheder og evt. rabat.
Men det er nu jeg så sidder fast, jeg vil at den skal hente enheds pris fra tabellen "Recordings" fra feltet "Quantity" og "Unit Price" for at den så derefter skal beregne slut prisen, og fortælle mig hvor meget der er på lager af den bestemte enhed. I "Recordings" er der registreret "Quantity" og "Unit Price" for hver enhed.
Jeg har prøvet: "=[Forms]![Recordings]![Quantity]"
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
megaf you dont say WHERE you want to use the information which your trying to find. If it is in the SUB form (underskemaet) then instead of using a table as the record source, make a query where you can JOIN the other table and make the calculations also. Then you use this query instaed of the table.
Nogen steder i programmet skal , erstattes med ; Dlookup vil her lede i feltet Quantity i tabellen Recordings. "RecordingID=" & RecordingID er et forsøg på en WHERE sætning, der skal bruges til at finde præcis den record som du leder efter.
Terry; I need the information about Quantity and Unit Price in the subform in my form "Add an Order and Details" after i've selected the product name. I think i've tried making a query in order to solve this issue but sofar without luck.
Superjap; Jeg får bare fejl når jeg har sat den information.
megaf I am not 100% sure what it is your trying to do! I can see that in the sub form your combo has a lookup to table Products, but you do not have a table with this name! Should this by any change be Recordings? If so then alter your lookup to take the data from this table and then in the combo's after update event you can alter the value of the other fields.
I In the combo I can see the row source is recordings, change this to a query where you select the ProductID and Title, and also the qty and unit price. Now change the column count to 4 and column widths to 0cm;5.08cm;0cm;0cm so that only the Title is visible.
Now in the combo boxes after update event (or the records BEFORE update event)
You can set the qty like this (columns start at 0!)
Hmm you lost me there Terry. I create a query where i add "ProductID","RecordingTitle","Quantity","Unit Price" After that i modify the subform of "Add an Order and Details" and change the combo box to =[Recordings Query]![ProductID] or?
If you please you may do the changes for me. Naturally only if you have time i can throw in 20 points extra or so...
I have altered the combo, you will now see three columns, these are Title, and qty and unit price.
In th esub forms BEFORE UPDATE event I have placed some code whcih takes the values from the combo and updates th evalues in the sub form fields. As I dont fully know yor requirements then I am not 100% sure if this is correct.
I'll have a look at it as soon as it's send, if any problems sending let me know. I'll say if your altering of it didn't meet my expectations, and we'll work it out. :)
Terry if i want to enter how many "quantity" i actually would like to order where do i / how do i change that? because now if i put in quantity from the subform it give my how many i got avaible which is ofcause fine. But i just need to enter how many i want.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.