Warn users of forgotten URLs in hyperlink fields

  • Thread starter Thread starter seaton via AccessMonster.com
  • Start date Start date
S

seaton via AccessMonster.com

Hello, everyone.

Sorry if this is a terribly basic question, but how do you set up a hyperlink
field so that the user will be warned if it does not include a URL? I ask
because I have a situation where users regularly enter the display text for
the hyperlink field, but forget to add the URL that goes along with it, and
then simply move on to the next record.

I'm thinking that an input mask may solve this problem, but what is the most
flexible way to write an input mask for general URLs? (Web sites only, no
network paths or anything like that.)

With many thanks in advance,

seaton
 
Not sure - never done it. But think you could use something like in the
beforeupdate

If Me!TextBoxName Not Like "*.com*.*" Or Me!TextBoxName Not Like
"*.co.uk*.*" Then
MsgBox "You must add the the URL", vbOKOnly
Cancel = True
End If


Although I think there is almost certainly a better way of doing this - no
time at the moment - someone else may give a better answer but this should
set you on the right track.

Good luck
 
Thank you, Wayne-I-M!

That seems like something that might work (I keep getting error messages at
the moment, but should be able to work those out). I'm thinking that Not Like
"*http://*.*" should work, because that's the part all URLs need to have.

Thanks again!

Wayne-I-M said:
Not sure - never done it. But think you could use something like in the
beforeupdate

If Me!TextBoxName Not Like "*.com*.*" Or Me!TextBoxName Not Like
"*.co.uk*.*" Then
MsgBox "You must add the the URL", vbOKOnly
Cancel = True
End If

Although I think there is almost certainly a better way of doing this - no
time at the moment - someone else may give a better answer but this should
set you on the right track.

Good luck
Hello, everyone.
[quoted text clipped - 11 lines]
 
Back
Top