John,
Here's the code I have attached to the command button on the Main 
form.
Private Sub cmd4HelpContacts_Click()
MsgBox "Please call or email:" & _
    vbCrLf & "Cindy Courtney at 919-297-1915" & _
    vbCrLf & "malto: [EMAIL PROTECTED]" & _
    vbCrLf & "======================" & _
    vbCrLf & "Doreen Darr at 919-297-1559" & _
    vbCrLf & "mailto: [EMAIL PROTECTED]" & _
    vbCrLf & "======================" & _
    vbCrLf & "Brad Lajeunesse at 919-297-1565" & _
    vbCrLf & "mailto: [EMAIL PROTECTED]", , "Help Contacts"
    
End Sub




--- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote:
>
> Doreen-
>  
> Are the controls in the "window" bound?  If so, the Hyperlink data 
type will
> work.  If not, you can use:
>  
>   Application.FollowHyperlink "mailto:"; & Me.EmailAddress
>  
> John Viescas, author
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> Running Microsoft Access 2000
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
> For the inside scoop on Access 2007, see:
> http://blogs.msdn.com/access/
> 
>   _____  
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] 
On Behalf
> Of rokkeee
> Sent: Friday, June 16, 2006 5:53 PM
> To: [email protected]
> Subject: [ms_access] Re: mandatory login for user
> 
> 
> 
> Thanks again John! The mandatory login works great!
> About the hyperlink for the email, I should have explained that on 
> the Main form is a button called "Help Contacts" and when clicked 
> opens a window displaying three different names with their 
> respective phone numbers and email addresses. This is in vb code 
and 
> not just a field on the form. You know how in word it 
automatically 
> changes to a (blue underlined) hyperlink? Can that be done easily?
> 
> Doreen
> 
> --- In [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> 
ps.com,
> "John Viescas" <JohnV@> wrote:
> >
> > Doreen-
> > 
> > As you've discovered, the Validation Rule won't trigger unless 
the 
> user
> > "dirties" the field. You'll have to add code to your buttons to 
> verify the
> > initials before performing any other action.
> > 
> > If IsNull(Me.cmbInitials) Then
> > MsgBox "You must enter your initials."
> > Me.cmbInitials.SetFocus
> > Exit Sub
> > End If
> > 
> > As for the email address, you can make the field a Hyperlink 
data 
> type, but
> > you'll need to add code to fix the Hyperlink. The problem is in 
> the absence
> > of a protocol header (http://, ftp://, mailto: ...) a Hyperlink 
> field always
> > inserts http:// - which won't work for an email address. Code in
> > AfterUpdate of the control will fix it:
> > 
> > Private Sub EmailName_AfterUpdate()
> > ' If you just type in an email name: Somebody@
> > ' Access changes it to: [EMAIL PROTECTED]://somebody@
> <http://[EMAIL PROTECTED]> ...# !!
> > ' This code tries to fix it
> > Dim intI As Integer
> > 
> > ' Don't do anything if email is empty
> > If IsNull(Me.EmailName) Then Exit Sub
> > 
> > ' Fix up http:// if it's there
> > Me.EmailName = Replace(Me.EmailName, "http://";, "mailto:";)
> > 
> > ' Now look for the first "#" that delimits the hyperlink 
> display name
> > intI = InStr(Me.EmailName, "#")
> > ' And put the person name there instead if found
> > If intI > 0 Then
> > Me.EmailName = (Me.FirstName + " ") & Me.LastName &
> > Mid(Me.EmailName, intI)
> > End If
> > 
> > End Sub
> > 
> > 
> > John Viescas, author
> > Building Microsoft Access Applications
> > Microsoft Office Access 2003 Inside Out
> > Running Microsoft Access 2000
> > SQL Queries for Mere Mortals
> > http://www.viescas. <http://www.viescas.com/> com/
> > (Paris, France)
> > For the inside scoop on Access 2007, see:
> > http://blogs. <http://blogs.msdn.com/access/> msdn.com/access/
> > 
> > _____ 
> > 
> > From: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> 
ps.com
> [mailto:[EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> 
ps.com] 
> On Behalf
> > Of rokkeee
> > Sent: Friday, June 16, 2006 3:45 PM
> > To: [EMAIL PROTECTED] <mailto:ms_access%40yahoogroups.com> 
ps.com
> > Subject: [ms_access] mandatory login for user
> > 
> > 
> > 
> > I have a Main form that opens with the database and the cursor 
is 
> in 
> > the combo box where the users can either choose their initials 
> from 
> > the list or type them in. I want this to be mandatory before 
they 
> can 
> > click on another other buttons to continue. Right now, I have a 
> > validation rule setup on that login box, but it only works if 
they 
> > populate that field then clear it. I want it to be mandatory 
from 
> the 
> > get go. How can I do that?
> > And on another note, how do I make the email address in a 
message 
> box 
> > a hyperlink that when clicked will automatically open outlook to 
> send 
> > a message to that person?
> > 
> > Doreen
> > 
> > 
> > 
> > 
> > 
> > 
> > [Non-text portions of this message have been removed]
> >
> 
> 
> 
>  
> 
> 
> [Non-text portions of this message have been removed]
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to