Your Access VBA project is getting a little confused.
Hold down the shift key and open the dB.
Open "frmEmail" in design view.
Click on the control "txtEmailAddress".
Change the control name
FROM "txtEmailAddress"
TO "txtEmailAddress
1". (Notice the 1 at the end) (you can use any character.....
)
Close the form (save - yes).
In the menu bar select "Database Tools/Compact & Repair" while holding down the shift key.
Open the IDE by pressing ctl-G, then ctl-R. Open the module for frmEmail.
Scroll down to the line "
strWho = txtEmailAddress"
Add a 1 (or the characters(s) you used) to the end of "txtemailaddress". (BTW, IMO, it would be better if you used "
ME.txtemailaddress" in code)
Move down one line using the arrow key.
The control name should now be in the same case as on the form.
The form should now be open in design view.
Remove the 1 (or the characters(s) you used) from the control name, then save and close the form.
You should make sure *
EVERY* code module (form/report modules and standard modules) has these two lines at the top:
Code:
Option Compare Database
Option Explicit
Fix the errors in your code.....
In the future:
Start compiling your code after every few lines added, changed or deleted.
Same goes for "Compact & Repair" when changing forms/reports.