14. januar 2008 - 11:05Der er
11 kommentarer og 1 løsning
Hvordan laver man en (Oracle) post-queryi Access?
I Oracle er det meget let at lave en post-query, dvs. når jeg har hentet data ind i en formular kan jeg hente ekstra oplysninger ind på baggrund af de data, der er i tabellen. Typisk er der f.eks. et CustID i tabellen, hvor jeg så vil hente CustomerName ind.
I Access kan jeg hente alle data ind hvis jeg laver en forespørgsel og så baserer min formular på forespørgselen. Problemet er så, at jeg ikke kan oprette en ny række i formularen.
Jeg har overvejet at lægge et felt ind, som så skal hente f.eks. CustomerName udfra CustID, men hvordan skal det gøres, og hvordan får jeg så kaldt at data faktisk hentes?
No, there's no Oracle here ;-) My problem is, that I've used Oracle for a long time, so I know excatly how I can get the data if! I uses Oracle. But now I have changed to Access and it is quite different .... from Oracle.
I have an Order tabel: OrderID, CustID, ..... Then I have a Customer tabel: CustID, CustName, .....
I would like to make a formular based on the Order table, but I would like to show the CustName (as users don't like just to look at number ;-) ) so my formula should be like
OrderID, CustID, CustName, .....
But the problem is how to get the CustName and show it in the formula.
You make a query which includes bothe tables and the fields you want. If the realtionships are correct then you shoul dbe able to make updates in the form.
If you make a query with both table then try editiin data directly in the query and if you canty update there then I suspect your relationhsips arent correct.
When you design a table, for example the order table, you can choose Lookup as the data type. If you choose this type a wizrad is used which will allow you to select the Customer table as the related table and this will create a combo which will automatically show the customer name when you make a form.
You have number of questions open which maybe you should close too
Synes godt om
Ny brugerNybegynder
Din løsning...
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.