09. oktober 2001 - 20:45Der er
9 kommentarer og 2 løsninger
Hvad er der galt her ???
Private Sub dato_AfterUpdate() If IsNull(DLookup(\"[tid]\", \"bedstetider\", \"[DisciplinID] = DisciplinID\")) Then If Me.dato < Date Or Me.dato = Date Then Call hvisnull End If End Sub
Function hvisnull() DoCmd.OpenQuery \"QtilføjvedNull\", acViewNormal, acEdit End Function
det er ikke tilføjelsesforespørgslen det er galt med, den fungere fint når jeg aktiverer den manuelt.
Efter ti år i London, Madrid, Paris og Utrecht kommer Sabios AI-fokuserede program af arrangementer om kundeoplevelser, ‘Disrupt’, for første gang til Danmark.
that was a part of it but the is one minor error more, unless i have an msgbox between \" If Me.dato < Date Or Me.dato = Date Then\" and \"Call hvisnull\" it doesn\'t call my function, why ????
Private Sub dato_AfterUpdate() If IsNull(DLookup(\"[tid]\", \"bedstetider\", \"[DisciplinID] = \" & DisciplinID)) Then If Me.dato <= Date Then hvisnull End If End If End Sub
Function hvisnull() DoCmd.OpenQuery \"QtilføjvedNull\", acViewNormal, acEdit End Function
Det kode jeg har skevet i spørgsmålet og terry\'s rettelse virker, men når det køres første gang blivr posten ikke tilføjet til tabellen. men hvis jeg blot ændre/indtaster et ciffer i datofeltet bliver den kørt andengang, hvordan hænger det sammen ???
hi ncbr> Well its hard to say, cant see all of your code. Does the dato_AfterUpdate get called the first time but no record is added with the query \"QtilføjvedNull\"? Are you sure the query gets called the first time?
I cant see why the dato_AfterUpdate event should get called just by entering a character in the date field, are you sure there is no event procedure in the on Change Event?
Ok, it gets called the first time. But why should it get called again just by enetering a character in the date field? Do you have a procedure on the On Change event?
I cant see what the Qtilføjvednull does, but try setting a breakpoint at this line and then step (F8) through the line. This is just to see if what you suspect is true. (the new record hasn\'t reached ...)
*Qtilføjvednull in an Qyery that adds the number of the swimmer, disciplinid, time, and date to a table, best times reached. if there are no record yet with this disciplinid
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.