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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|