need help with separating text in forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form where it asks for a name, and the user enters a name "John
Smith".
what i want it to do is automatically populate another text box on the same
form for email address. my company uses the first and last names without a
space for our email scheme. what i want the email text box to show for this
example is "(e-mail address removed)". how do i get the space between the names
to disappear, without changing the table format or the form format.
thanks for any help you are able to give.
 
Check Access VB Help on the Replace() function which you can use to replace
space with an empty String.
 
using access 2000, not sure how to do what you suggested, help files are not
showing anything for the Replace() function.
 
jkendrick75 said:
using access 2000, not sure how to do what you suggested, help files
are not showing anything for the Replace() function.

You have to make sure your looking in help for VBA, not help for Access.

You can also open the immediate window, type "Replace", put your cursor on
the word and press <F1>.
 
all i'm seeing in the help files is for the SelLength, SelStart, and SelText
Properties, but when i look through that, i don't see an example that will
help me in my situation. thanks for the replies though... any other ideas
will be much appreciated.
 
jkendrick75 said:
all i'm seeing in the help files is for the SelLength, SelStart, and
SelText Properties, but when i look through that, i don't see an
example that will help me in my situation. thanks for the replies
though... any other ideas will be much appreciated.

Did you try the trick with the immediate window and the <F1> key? I just
tested that in Access 2000 and it took me directly to the help topic for
Replace().

Anyway the syntax is...

Replace(expression, find, replace[, start[, count[, compare]]])
 
In your text box, simply put:

=([FirstName] & [LastName] & "@yahoo.com")

Of couse, change the @yahoo to whatever you need in you case...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top