Hi,
I have a some form.
And I wrote code that was inserted value to the table:
And question:
When I add data without line "problem line - comment", The data are added, but the form doesn't refresh the textbox. But when I add "problem line - comment", form is refresh but data are duplicated. I tried this code to last line in my code:
, and works the same as the previous(refresh form, but duplicated data)
I have a some form.
And I wrote code that was inserted value to the table:
Code:
Private Sub dodaj_rekord_Click()
SQL = "INSERT INTO WSTAWIENIA(REFERENCJA, ILOSC, KTO) VALUES(" & Forms!WSTAWIENIA!referencja & "," & Forms!WSTAWIENIA!ilosc & "," & Forms!WSTAWIENIA!kto & ");"
DoCmd.RunSQL SQL
[SIZE=3][COLOR=Red][B]DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 'problem line[/B][/COLOR][/SIZE]
End Sub
When I add data without line "problem line - comment", The data are added, but the form doesn't refresh the textbox. But when I add "problem line - comment", form is refresh but data are duplicated. I tried this code to last line in my code:
Code:
DoCmd.GoToRecord , , acNext