UDFs that accept arguments to process UPDATE/INSERT INTO SQL stmts?

steve728

Registered User.
Local time
Today, 02:59
Joined
Mar 4, 2003
Messages
16
Before attempting to create a VBA User Defined Function that will accept arguments for creating UPDATE/INSERT INTO SQL statements, I thought I would check to see if some already exist. It seems like a very tough task to tackle. I'd like it to determine the data type of the the values being placed into the specified fields and subsequently provide the appropriate syntax. (i.e. '" & mString & "', #" & mDate & "#, etc.) Do any exist?

I'm working with MS Access 2003.

Thanks,

Steve G.
:confused:
 
Hi Steve G.

Don't know of any, but you might fond some references if you do a search on the internet.

I would suggest you have a go at doing it yourself. Creating SQL strings for various types of queries isn't so hard, especially since you can use the query design view to create a prototype SQL statement (which often can be cleaned up - too many brackets - and simplified - multiple unnecessary references to the same table). This prototype can then be emulated in code by concatenating strings and variables, and then executed.

As I said, give it a go - you will learn a lot! :cool:
 

Users who are viewing this thread

Back
Top Bottom