11. januar 2002 - 10:00Der er
28 kommentarer og 2 løsninger
Relationer og tabeller
Godmorgen! :)
Jeg sidder og arbejder med en kundedatabase i Access. Her har jeg for nyligt lavet en forespørgsel, der viser hvilke kunder, der skal mersælges for perioden 2003. Disse kunder kan ligeledes findes ved søgning i vor faktura-tabel. Mit problem er, at en kunde der f.eks. er blevet solgt på flere områder/amter, står listet flere gange i forespørgslen - netop grundet de forskellige områdekoder.
Jeg vil gerne have forespørgslen til at slå alle kundens områder sammen til én stor faktura, i stedet for - som det virker nu - at kunden får én faktura pr. område/amt.
Hvis I mangler flere informationer, skal I endelig spørge. Jeg er bare ikke lige verdens sejeste haj til Access :)
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.
Send me the dB and I will take a look. I need to know which query and report we are talking about and also what EXACTLY you want to see in the final report dktebrsa@europe.lego.com
Your query isnt grouping on anything so it is more than likely in the report you are grouping you can just modify the report NOT grouping on \"områd\"/amt
SELECT Kunde.Kode, Kunde.FirmaNavn, Sum(Faktura.Pris) AS FPris FROM Kunde INNER JOIN Faktura ON Kunde.Kode=Faktura.Kode WHERE Faktura.Årgang=2003 GROUP BY Kunde.Kode, Kunde.FirmaNavn;
um the query is called \'Rapport_Relation_2003\'.. I merely want it to display those customers in the \'Faktura\' form, in a way that it shows their totals; i.e. all the fields of work and areacodes on one \"Faktura\" (/Invoice ?)
Hi xtom>proaccess SELECT gives you the sum (all faktura) for each \"kunde\", doesnt this solve your problem? You cant see all the fields in the other tables when GROUPing in a query. I can alter your query to give you the same as what proaccess has given you butis this what you want?
xtom\' At the moment the FAKTURA form shows ALL faktura (12369 of them). Then on on a sub form it shows the related KUNDE. There are two more sub forms one of them shows rykker information (per Faktura). So as far as I can see it you cant just modify the record source to the main form so that you get a total faktura or the sub forms will no longer function correctly. You need to make a new form showing just the information you want!
(That meant \"not really\"). For instance customer no. 10012 has a number of invoices, typed or recorded if you wish, in 2003. I then would like the data on those (year 2003) invoices to be listed on one single invoice, maybe the chronologically first year 2003 invoice. That particular invoice would then show me which area codes and fields of work, the customer is listed with - and at which total price and discount.
xtom I am sure I know what you want, but I am trying to tell you that without altering the form FAKTURA drastically you can NOT use it.
lets talke the sub form containing rykker information. This information is per FAKTURA, there is a LINK between the main form and the sub form on FAKTURANR. If you make a query showing the total for ALL faktura for customer 10012 for the year 2003 then FAKTURANR no longer exists, youonly have the total (DO YOU UNDERSTAND THAT?) and now because FAKTURANR no longer exists the link to th esub form is lost, so you canNOT display rykker information.......
Hi terry :] I haven\'t received any further instructions on what to do in this matter and it seems obvious that ppl would like to keep the current form as it is. On one hand I\'d like to wait a few more days for clarification but I also don\'t mind giving points at this time - theres plenty to take from :)
hi again, terr :) sorry for reporting back this late, apparently eksperten.dk didn't send me a notice saying you'd made a comment here :(
anyways, problem solved. The ppl mentioned before brought in some c0der who made the trick work and without changing the form_faktura. however, I'd like to give out points anyway for good support. I trust you'll destroy the copy I sent you, terr? ;)
thanx!
Xtom` =)
PS: I'll make a new question in a few mins - need a font and can't seem to find it anywhere.. and it's pretty damn urgent :(
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.