murgatroyd
Registered User.
- Local time
- Today, 15:10
- Joined
- Mar 26, 2016
- Messages
- 31
The table is created manually.
OK thanks. In my database, I created an output table the same as your example, and I created a form with a Run button and put your code in the OnClick event. In the code, I replaced the names of the input table and the fields with the actual ones from my database.
When I tried it, I got an error: "The expression On Open you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name." I tried removing "Cancel As Integer" from the first line, and the error went away.
When I tried it again, I got a VBA error: "Compile error: User-defined type not defined", with ", rst As DAO.Recordset" highlighted (end of second line).