06. juni 2020 - 20:29Der er
6 kommentarer og 2 løsninger
Kan "Ja" i et felt i formular A generere en tekst i underformular B?
Kan jeg ved at sætte flueben (=Ja) i et Ja/Nej-felt - felt A - i formular A få genereret en bestemt stump tekst i et tekstfelt - Felt B - i formular B?
Formular B er underformular til formular A, og der er en en-til-mange relation mellem tabellerne A og B, som er postkilder til henh. formular A og B. - Eller helt præcist: postkilderne til de to formularer A og B er forespørgslerne q-A og q-B, som baserer sig på tabellerne A og B.
Answer to your question "Kan jeg ved at sætte flueben (=Ja) i et Ja/Nej-felt - felt A - i formular A få genereret en bestemt stump tekst i et tekstfelt - Felt B - i formular B?"
would be yes, but theres a couple of things you need to think about.
When you change the value of the yes/no field it hasnt actually changed the value in the table until the changes are commited to the table. IE after the forms AfterUpdate event is fired.
If its a one to many, is it all records in the sub form which need to be updated, or a specific? And what do you do if you later change the value from Ja to Nej?
So the sub form (B) is only showing one of the many records in table B?
Sounds strange that if you update a field on the main form (A) it only has to have an effect on one recod in B. What if you now move to the next record in the sub form, the Ja/Nej field on the main form is still Ja! Can you explain the logic in that?
Anyway, you should be able to change the value of a field on the sub form something like this
Åh nej. Jeg har set og skrevet forkert. Både Ja/Nej felt og tekstfelt befinder sig i samme formular. Sorry! At formularen er en underformular til en anden formular er vel sagen helt uvedkommende.
Det at felterne er i samme formular forenkler forhåbentligt problematikken. Jeg beklager at have spildt din tid grundet fejlen!
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.