06. oktober 2003 - 18:58Der er
31 kommentarer og 1 løsning
Felt betingelser
Hej Jeg har en tabel med 4 kolloner: Tal1 Tal2 Tal3 Tal4
Jeg vil godt have at tal1 bliver autoudfyldt udfra forholdet mellem tal3 ogtal4. F.eks. Hvis tal3>tal4 er tal1 = 3 Hvis tal3<tal4 er tal1 = 0 Hvis tal3=tal4 er tal1 = 1
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.
If you are using ASP as the user interface then you can use VBScript or something and then do it directly in SQL as kvadratrodenaf1 shows. You will also very likley need an update too!
But lets find out where you are entering the data first?
burkal>If you have worked with Excel then you should have NO problem with Access VBA. BUT you MUST enter the data through a form so that you have access to VBA. Otherwise where are we going to write IF.....
original question: I have the mentioned table, which is a table which should record soccermatch results. Column tal1 and tal2 are points earned by home- and awayteam. Tal3 and tal4 is goals for Home- and awayteam.
I want to keep the DB as simple as possible as I am new to MS Access. This DB is also meant as a learning expirience. So no forms, reports or presentationlayers if at all possible.
My question regarding Joins is because I have two queries, which makes a table with Home- and awayteam standings and it is natural to use a join to unite the two tables. Is there a SQL-window where you can type in SQLcommands? or can you read in a txtfile with sql in access?
In Access you should see a button (icon) named Queries on the database window. Press this button an dthen at the top of the database window press New. Now you get a dialog where you can choose from differmet types of queries, select Design View (the top one).
Now you can choose which tables you want to use, and if you press close without chooseing any tables you can then enter the SQL directly. Right click on the title bar of the query window and choose SQL view from the menu. Or choose SQL from th emain menu.
In Access you can NOT enter a new record and set the value of a third field from the values you enter form the first two fiels! You will need to run an update query AFTER you enter a new record.
In your table you only need to record the goals scored, then in an SQL statement you can calculate the values of the other fields
yes, jeg har modtaget det. Det ser jo meget nemt ud. ;o) Jeg tror jeg skal ha lavet db så simpel som muligt inden jeg begynder med forms. Men tak fordi du viste mig det. Jeg tror jeg stopper for idag. Så du skal have mange tak.
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.