I think you are making good progress with your procedure however I would like to point out a couple of things that may help.
I know I copy and paste code however I am VERY careful to look it over and read everything I can to try and understand the concepts as should you. I know VBA may be new to you but not very often will you find a complete copy paste solution. You will find most developers will be glad to help step you through your problems and issues the biggest thing they want is for you to learn what you are doing and how it is done, even if someone gives you a copy paste solution it may not be designed for all of your needs or could have errors that can be easily remedied.
I am self taught so I understand that it may be a bit frustrating, but not even Microsoft gives complete copy paste solutions whether it is in a help file or otherwise. Something is almost ALWAYS missing or needs a slight adjustment.
For instance:
rs is not declared or even initialized, this can generate an error, in fact this is the only place it is even used try changing this to a recordset you are fixing to try and loop through such as the "rsIn". There is a few things in the code that you may or may not plan to use so keep this in mind.
My next question is the table names I didn't see them when I browsed the posts and I have been Kinda watching this one. Is your table name actually "tblWorkOrderDe scription" as per nico's code or do you need to change these?
When you are in the VBA window you have a completely different set of help files. You can easily find out more about recordsets by highlighting a word then press F1 (on a pc).
On the top of my modules I also ALWAYS make sure the following is in place and I Compile/Save constantly:
More about that here:
Writing Solid Script
To compile click on the debug menu then click compile.
I hope this helps some.
I know I copy and paste code however I am VERY careful to look it over and read everything I can to try and understand the concepts as should you. I know VBA may be new to you but not very often will you find a complete copy paste solution. You will find most developers will be glad to help step you through your problems and issues the biggest thing they want is for you to learn what you are doing and how it is done, even if someone gives you a copy paste solution it may not be designed for all of your needs or could have errors that can be easily remedied.
I am self taught so I understand that it may be a bit frustrating, but not even Microsoft gives complete copy paste solutions whether it is in a help file or otherwise. Something is almost ALWAYS missing or needs a slight adjustment.
For instance:
Code:
' test for rows to be processed, else stop If rs.EOF And rs.BOF Then Exit Function End If
My next question is the table names I didn't see them when I browsed the posts and I have been Kinda watching this one. Is your table name actually "tblWorkOrderDe scription" as per nico's code or do you need to change these?
When you are in the VBA window you have a completely different set of help files. You can easily find out more about recordsets by highlighting a word then press F1 (on a pc).
On the top of my modules I also ALWAYS make sure the following is in place and I Compile/Save constantly:
Code:
Option Compare Database Option Explicit
Writing Solid Script
To compile click on the debug menu then click compile.
I hope this helps some.
Comment