Is there a way to creat user defined function for a access database when calling the datbase from vb


For example

VB Code:
  1. Sub OpenRecordSet()
  2.  
  3. Set rst = dbs.OpenRecordSet("Select Field1, MyFunction(Field1) From Table1")
  4.  
  5. End Sub
  6.  
  7. Function MyFunction(AnyThing)
  8. MyFunction = Anything + 1
  9. End Function