I
Ian Henderson
I have a function, originally written for use in Access97, which formats a
character string, according to the format prescribed in the code that calls
it. What this means is that if you run a string containing a Scottish
surname (such as McDonald) through the function, it will come out with the
correct letters converted to Uppercase. Also, it'll correctly format a UK
postal code, or UK telephone number, as dictated by the switch in the code.
Now, in Microsoft Access, the following code would be used:
For a character field to be formatted as a standard text string, the code
would read "sMyText = TextFormat(sMyText,"Text") "
For a character field to be formatted as a UK Postal Code, the code would
read "sMyText = TextFormat(sMyText,"Pcode")
For a character field to be formatted as a UK Phone Number, the code would
read "sMyText = TextFormat(sMyText,"Phone")
Now, I've successfully converted the TextFormat functions so that they
compile properly using VB.NET. However, I've got no way of testing that it
does exactly what it's supposed to do. I need to know the following:
1. How do I register the DLL so that it can be picked up by any
application that happens to need it
OR
Can I write code that will register the DLL before it runs it,
without causing a conflict if the DLL has already been registered.
2. How do I create a form, in a separate project, that can be used to
check whether the function is working properly?
I'd be really grateful if anyone can help me with this - it's been doing my
head in for about a week now.
Thanks in Advance
Ian Henderson
Database Developer and .NET Novice
character string, according to the format prescribed in the code that calls
it. What this means is that if you run a string containing a Scottish
surname (such as McDonald) through the function, it will come out with the
correct letters converted to Uppercase. Also, it'll correctly format a UK
postal code, or UK telephone number, as dictated by the switch in the code.
Now, in Microsoft Access, the following code would be used:
For a character field to be formatted as a standard text string, the code
would read "sMyText = TextFormat(sMyText,"Text") "
For a character field to be formatted as a UK Postal Code, the code would
read "sMyText = TextFormat(sMyText,"Pcode")
For a character field to be formatted as a UK Phone Number, the code would
read "sMyText = TextFormat(sMyText,"Phone")
Now, I've successfully converted the TextFormat functions so that they
compile properly using VB.NET. However, I've got no way of testing that it
does exactly what it's supposed to do. I need to know the following:
1. How do I register the DLL so that it can be picked up by any
application that happens to need it
OR
Can I write code that will register the DLL before it runs it,
without causing a conflict if the DLL has already been registered.
2. How do I create a form, in a separate project, that can be used to
check whether the function is working properly?
I'd be really grateful if anyone can help me with this - it's been doing my
head in for about a week now.
Thanks in Advance
Ian Henderson
Database Developer and .NET Novice