check for @ sign?

AJ IT Student

Registered User.
Local time
Today, 22:20
Joined
May 8, 2002
Messages
36
Hi all..
Thanks for everyones help earlier - though i still haven't sorted my core problem! More about that later.

I need a couple of relatively simple (to you!) bits and bobs if thats ok...

1. How do I create a filter so that the 'emailaddress' MUST have @ and "." in it? If these are not present, I would like a message box saying so... This may be simple (?) but also I don't really have many Access wizards at all!

2. If nothing at all is entered on my 'AddEmployee' form, it doesn't count it as a record, and therefore just exits the form without doing anything. I'd like a small piece of code to do something like: If $LastnameField == "" { MsgBox "no record was added as you left all fields blank" } - I only know PHP's format of programming - and not very well at that!
How could I do this - and attach the code to the 'addrecord' button?

3. How do I make it so that on fields in a table, it will let me have something like: 0208 484 3840... Whenever I try, it always takes out the ZERO, and sometimes says its too long. I am using Long Interger- and can't find any option to specify the length. Any ideas?

It may sound stupid, but I really need some more Macros, Validation Rules, and little bits of VBA in my project to get an A.

Any little tips? Which can I use? I don't have a real clue about how to build a validation rule or Input Mask - and I don't have the wizards. Something silly like calculating ones Age from their bday?

I am honestly extremely grateful for all help!!

Unfortunately there is a lot resting on this. I'm not going to get much sleep over the next few days. and I have to work :( :confused:

Many many thanks.
aj
 
Yes.
And I should have actually given it in today.

I've got an extension until Friday - definite last date I can hand it in.

Can you help with the above? I don't want a chatty post - this is honestly quite important to my future however ridiculous that may seem.

thx
 
Aren't you the fella that posted yesterday saying:
"I have a project in for Tuesday - simple as that! "

Today's Tuesday.

1- Help Files: Instr
Filter
MsgBox

2- Help Files: IsNull

3- Help Files: InPut Mask


"It may sound stupid, but I really need some more Macros, Validation Rules, and little bits of VBA in my project to get an A"

It doesn't sound stupid. It sounds like you have some big ####s.

What are your fellow students doing?
What would your teacher say if (s)he knew this wonderful group of people was doing your project for you?

"Any little tips? Which can I use? "

The greatest tip I learned in Computer School 5 years ago, (although I didn't think so at the time!!) was learning how to use the F1 button. It's easy to use.

Never mind.

What do I know.....:confused:
 
Thank you.
I'd consider this as a 'resource'.

I'm trying to manage quite a lot of things. I understand it may be a bit brash and hasty of me posting on here, but I'm trying my best... People really dig in...

My teacher is so unhelpful its unreal.
None of the other students will get above a C - you should see the college. This is with a couple completely using their friends project from last year.

I have tried.

& I wouldn't call "the F1 key" : "people doing your project for you".

I'm learning...

thank you.
aj
 
1) Checking for "@"

in the AfterUpdate event of your email field (textbox) try:

If Not Me.EmailNameBox Like "*@*" Then
MsgBox "The email address entered appears to be incorrect. Please check before continuing.", vbOKOnly, "Email Address Verification Required."
End If

Nb: not fool proof. Will permit an address as long as it has @ in it. eg: brad@ will be permitted, as will @domain.com without full detail.


3) If you are storing phone numbers (as it appears by 0208 etc) then do not store them as Long Integer. You could use a text data type as you are very unlikely to perform any calculations using a phone number. Integer data types will drop the leading zero, as it is insignificant in relation to a number.


Call me psychic, but I can see a sick day in the very near future. ;)
 
guys..

thanks for all your help.

Some of the points you raised are very true also.

I'll post my application after its been marked and someone may want to further develop (hmmm!! not exactly a great starting point!) or another beginner may find it of some use!

I solved most of my problems I posted in this thread with your help though, so thank you.

cheers,
aj
 

Users who are viewing this thread

Back
Top Bottom