Hi Kevin,
Compared to you I am a lowly novice.
Not really. If you keep working with Access a lot, read questions posted by
others along with the answers received, read books, etc., you will soon be in
a position to answer questions. Actually, attempting to answer questions
posted by others is a great learning technique, because it forces one to
research the answer. Anyways, just keep doing what you are doing. It will
come!
I am not familiar with PITA, ...
That would be "Pain-in-the-ass" said:
This refers to the data type in table design view. I was advising to open
the table in design view, and change the hyperlink data type to Text. Set the
Field Size to the maximum, which is 255 characters. That should be long
enough to cover most e-mail addresses.
A command button is an object on a form that one clicks to cause some
action. For example, open the Northwind sample database that is likely
already installed on your PC (search for Northwind.mdb, or within Access,
click on Help > Sample Databases... > Northwind Sample Database (not
Northwind Access Sample Project). The opening form includes a command button
labeled "OK" (unless you choose "Don't show this screen again". The
switchboard form includes seven command buttons, each of which has a click
event procedure associated with it.
Can you be more specific in your instructions?
I'll try. First, make a copy of your database, and work on the copy. That
way, if anything goes wrong, you can easily restore from a backup copy. Open
the form in question in design view. Click on View > Toolbox to display your
toolbox if it is not already displayed. Select the command button from the
toolbox. Drag a rectangle on your form with your mouse for the approximate
size that you want your new command button. If a wizard pops up, just close
it (this is controlled by another button in the toolbox).
Click on View > Properties to display the properties dialog (if it is not
already displayed). Select your new command button. You should see "Command
Button:" with the default name of the new command button in the title bar of
the properties dialog. Select the Other tab. Name your new command button
"cmdSendEmail" (without the quotes). Select the textbox that is used to
display the e-mail address. You should see Text box in the title bar of the
properties dialog. Change the name of this text box to "txtEmail" (again, no
quotes).
Now select the command button again, and click on the Event tab of the
properties dialog. Click your mouse into the event that reads "On Click". You
should see a dropdown box. Select [Event Procedure] from the list. Click on
the Build button (the small button with the three dots, to the right of the
dropdown). This should cause a module to open up that is associated with this
form. In the module, you should see the following, with your mouse cursor
blinking in-between within your new click event procedure:
Option Compare Database
Option Explicit
Private Sub cmdSendEmail_Click()
End Sub
Special note: If you do not see "Option Explicit" as the second line of
code, then add it manually. Here is a gem tip that discusses these two very
important words, and how you can configure your PC to always include them in
newly created modules:
Always Use Option Explicit
http://www.access.qbuilt.com/html/gem_tips.html#VBEOptions
Now, go back to the initial reply that I posted. Select everything
in-between the Private Sub cmdSendEmail_Click() and the End Sub, copy it
(Ctrl C) and paste it (Ctrl V), at the location that your cursor was first at
when the module popped open.
Still in the Visual Basic Editor (VBE), click on Debug > Compile
ProjectName, where ProjectName is the name of your VBA project (likely the
same name as your database). If all goes well, your VBA code will compile
without any complaints. If you have any compile errors, you'll need to fix
these before proceeding. Assuming no compile errors, click on the Save
button, and close the Visual Basic Editor.
Open your form in normal mode and try out your new command button.
Tom Wickerath
Microsoft Access MVP
http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
Kevin said:
Sorry I have not responded sooner, I have been out of the office. Compared to
you I am a lowly novice. Can you be more specific in your instructions? In a
form, the customer information has a text field or the email address. The
text field name is Email Address. I have been able to turn on and off the
hyperlink. When the Hyperlinked is on, access assumes it is a web page unless
I precede it with mailto: I am not familiar with PITA, Text 255, or command
buttons. I began using access with not experience. I purchased several books,
and I learn as I go. Once I've learned what you are trying to show me I will
incorporate it in the future.