Hello all,
I have a form (The name is "foOfferteInhalt"), this form gives the table "tblOfferte10Einträge" the data it needs.
However, the problem is this, I have this table here:
And I have this form:
The field "Anzahl" and the radio button "Per" are both responsible for the field "Anzahl" in the table. So when the user clicks on "Per", I want the table to show "Per" in the "Anzahl" field. And if "Per" is not clicked, the entry from the "Anzahl" field should be taken over.
I have written this code but it doesn't quite work:
Do you have a solution?Code:Set db = CurrentDb Set rs = db.OpenRecordset("tblOfferte10Einträge") If Not IsNull(Forms!foOfferteInhalt!Bezeichnung1_0) Then With rs .AddNew !Bezeichnung = Me!Bezeichnung1_0 !Einheit = Me!Einheit1 !Anzahl = Me!Anzahl1 If Not IsNull(Forms!foOfferteInhalt!Per1_0) Then !Anzahl = Me!Per1_0 End If !Einheitspreis = Me!Total1 !Summe = Me!Summe1 !Untertext = Me!Untertext1 .Update End With End If rs.Close Set rs = Nothing db.Close Set db = Nothing