Public Function Assembler(ByVal strMode As String, ByVal tblName As String, _ I've been reusing (sometimes minor modifications as I identify weaknesses in the function design) the below in various places. Open the table and walk through the field names (using tabledefs) and create a list in the proper syntax for fieldnames in a SQL statement.then dynamically throw in the rest of the key syntax. The latter lent itself to a different approach. I also found that I commonly used all the fields in a given table.in the exact order they were in that table. It was easier to just make a custom function to do a specific task. What I've found is, particularly because of size (you can only fit 255 characters into a single text field) that I ended up needing to split up many queries. In my personal opinion, at this time, I've outgrown this method somewhat. The technique is valid for any use of SQL.particularly when you want to get a recordset object or if you wish to create the queries (querydefs). Here is one example of what I'm talking about.Īs summary, this technique illustrates how to put your queries into a table, and then recall the information and use it in a SQL statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |