A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Clip Board Question



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 08:33 PM
Stu Dongel
external usenet poster
 
Posts: n/a
Default Clip Board Question

Hey all,
So I am working on this database, that essentialy stores names and
adresses, and as of late I am getting these names and adresses through
email. I am a neophyte programmer at best, and I am trying to come up with a
way that i can copy an entire adresss from an email formated as such:

Stu Dongel
4444 Valley Poo Drive
Somwhere, CA 90210

and paste is straight int a form in wich i have a control for name, address,
city, state, and zip.

Is this tangable, or just wishfull thinking? Any Nudges/ solutions would
be much appriciated. Thanks in advance.

Stu


  #2  
Old May 26th, 2004, 09:13 PM
James
external usenet poster
 
Posts: n/a
Default Clip Board Question

get the data as comma seperated with text in quotes. then import it.
i.e.
"Stu Dongel", "4444 Valley Poo Drive", "Somewhere","CA",90210


"Stu Dongel" wrote in message
...
Hey all,
So I am working on this database, that essentialy stores names and
adresses, and as of late I am getting these names and adresses through
email. I am a neophyte programmer at best, and I am trying to come up with

a
way that i can copy an entire adresss from an email formated as such:

Stu Dongel
4444 Valley Poo Drive
Somwhere, CA 90210

and paste is straight int a form in wich i have a control for name,

address,
city, state, and zip.

Is this tangable, or just wishfull thinking? Any Nudges/ solutions would
be much appriciated. Thanks in advance.

Stu




  #3  
Old May 26th, 2004, 09:31 PM
Kevin Sprinkel
external usenet poster
 
Posts: n/a
Default Clip Board Question

Hey, Stu. The approach I might take is cut and paste the
address to another unbound control on the form, then use a
command button to parse the components and write them to
the appropriate controls. Something like the following,
which assumes the state is 2 letters long, with the
address on one line, and the city, state, and zip on
another.

Private Sub Command12_Click()
' Assumes the format of the address is:
' Street Address
' City, State Zip
' with the state being two letters long
' Pasted value in control txtBlobAddress

Dim strBlob As String, strTemp As String

' Parse/write address
strBlob = Me!txtBlobAddress
strTemp = Left(strBlob, InStr(strBlob, vbCrLf) - 1)
Me!txtAddress = strTemp

' Parse/write City
strBlob = Right(strBlob, Len(strBlob) - Len(strTemp) - 2)
strTemp = Left(strBlob, InStr(strBlob, ",") - 1)
Me!txtCity = strTemp

' Parse/write State
strBlob = Right(strBlob, Len(strBlob) - Len(strTemp) - 2)
strTemp = Left(strBlob, 2)
Me!txtState = strTemp

' Parse/write Zip
strTemp = Mid(strBlob, 4)
Me!txtZip = strTemp

' Clean up
Me!txtBlobAddress = Null

End Sub

HTH
Kevin Sprinkel


-----Original Message-----
Hey all,
So I am working on this database, that essentialy

stores names and
adresses, and as of late I am getting these names and

adresses through
email. I am a neophyte programmer at best, and I am

trying to come up with a
way that i can copy an entire adresss from an email

formated as such:

Stu Dongel
4444 Valley Poo Drive
Somwhere, CA 90210

and paste is straight int a form in wich i have a control

for name, address,
city, state, and zip.

Is this tangable, or just wishfull thinking? Any

Nudges/ solutions would
be much appriciated. Thanks in advance.

Stu


.

  #4  
Old May 27th, 2004, 03:29 PM
Stu Dongel
external usenet poster
 
Posts: n/a
Default Clip Board Question

Thank You so much Kevin,
I did a lil fiddling and got it to work,
you saved me a ton of time...

thanks again
stu

"Kevin Sprinkel" wrote in message
...
Hey, Stu. The approach I might take is cut and paste the
address to another unbound control on the form, then use a
command button to parse the components and write them to
the appropriate controls. Something like the following,
which assumes the state is 2 letters long, with the
address on one line, and the city, state, and zip on
another.

Private Sub Command12_Click()
' Assumes the format of the address is:
' Street Address
' City, State Zip
' with the state being two letters long
' Pasted value in control txtBlobAddress

Dim strBlob As String, strTemp As String

' Parse/write address
strBlob = Me!txtBlobAddress
strTemp = Left(strBlob, InStr(strBlob, vbCrLf) - 1)
Me!txtAddress = strTemp

' Parse/write City
strBlob = Right(strBlob, Len(strBlob) - Len(strTemp) - 2)
strTemp = Left(strBlob, InStr(strBlob, ",") - 1)
Me!txtCity = strTemp

' Parse/write State
strBlob = Right(strBlob, Len(strBlob) - Len(strTemp) - 2)
strTemp = Left(strBlob, 2)
Me!txtState = strTemp

' Parse/write Zip
strTemp = Mid(strBlob, 4)
Me!txtZip = strTemp

' Clean up
Me!txtBlobAddress = Null

End Sub

HTH
Kevin Sprinkel


-----Original Message-----
Hey all,
So I am working on this database, that essentialy

stores names and
adresses, and as of late I am getting these names and

adresses through
email. I am a neophyte programmer at best, and I am

trying to come up with a
way that i can copy an entire adresss from an email

formated as such:

Stu Dongel
4444 Valley Poo Drive
Somwhere, CA 90210

and paste is straight int a form in wich i have a control

for name, address,
city, state, and zip.

Is this tangable, or just wishfull thinking? Any

Nudges/ solutions would
be much appriciated. Thanks in advance.

Stu


.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.