I hope someone can help me out. I just recently started to work with VBA. I'am trying to build a UserForm where a user can fill in the form and after that it generates a document/report.
That seems to work out well.
I also want to transfer the data that is entered into a access database. But.... If the information in a certain TextBox matches a number in table1, field1 (or colomn, i named it var1) i want to
edit that specific record instead of creating a new record (in the Access Database). If the information in the textbox doesn't match with the number in table 1, field1, then it has to add a new record.
I know that I can edit a record with .edit and that i can add an new record with : AddNew.
I used Microsoft Word with VBA to build the userform. I can't find any good forum specific for MS Word so I hope someone here can help me out. Thanks for the effort.
To be more specific, what I want it to do:
If the value in the textbox already is in the table
Edit record in the table in access
Else value in textbox is not there
Insert a new record
End If
Script:
Bookmarks