Simple Software Solutions
Hi,
Contrary to popular beleif you can connect to modules from other Mdb's.
Step 1
Create a blank Access mdb that will contain your popular functions and subroutines.
Step 2
Create a module and insert them in there and save your module
Step 3
Open up your main MDB and design an existing module. Go to Tools then Refererences and click on browse. Change the extension to *.mdb in the Look for box.
Navigate to the source code MDB and click ok.
Tick the box in the reference list. It may change the MDB name to db1.
Step 4
Create a blank form and add a text box and a button
Name the Text field TxtFullName
on the OnClick property of the button
Enter the following:
Msgbox db1.ExtractSurname(Me.TxtFullName)
Where db1 is the name of the reference and FunctionName is the name of the function you want to employ.
In the following example I have a function named ExtractSurname() that takes the last word in a persons full name and returns the last complete word.
Example:
LastName = ExtractSurname("Fred Blogs")
LastName = "Blogs"
Type in Fred Blogs into your text field then click the command button
You should now get a message box with the word Blogs appearing
Try this and if it works for, good.