Connecting Tech Pros Worldwide Forums | Help | Site Map

Reading first line of textbox Updating in AfterUpdate

Lumpierbritches
Guest
 
Posts: n/a
#1: Nov 13 '05
Thank you in advance for any and all assistance, it is GREATLY appreciated. I
was wondering if there is a way to tell Access 97 to compare the first line
with other textboxes using the "Trim(StrConv" and joining two textboxes into
one then adding it, ONLY if that string IS NOT matched in another textbox?

Example: Trim(StrConv(LastName,1))& " " &Trim(StrConv(FirstName,1)) then adding
this to the address textbox, only if line one evaluated false to append the
name to the address in the AfterUpdate in the Address?

So, the Address would read before update:

1234 Any Street
AnyTown, USA 12345

and AfterUpdate would read

ANY PERSON
1234 ANY STREET
ANYTOWN, USA 12345

thank you,

Michael

Wayne Morgan
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Reading first line of textbox Updating in AfterUpdate


Something like

If InStr(Nz(Me.txtTextbox2,""), Nz(Me.txtTextbox1,"")) = 0 Then

This will be true if the string from txtTextbox1 is NOT in txtTextbox2.

--
Wayne Morgan
MS Access MVP


"Lumpierbritches" <lumpierbritches@aol.com> wrote in message
news:20040524214945.21491.00001930@mb-m10.aol.com...[color=blue]
> Thank you in advance for any and all assistance, it is GREATLY[/color]
appreciated. I[color=blue]
> was wondering if there is a way to tell Access 97 to compare the first[/color]
line[color=blue]
> with other textboxes using the "Trim(StrConv" and joining two textboxes[/color]
into[color=blue]
> one then adding it, ONLY if that string IS NOT matched in another textbox?
>
> Example: Trim(StrConv(LastName,1))& " " &Trim(StrConv(FirstName,1)) then[/color]
adding[color=blue]
> this to the address textbox, only if line one evaluated false to append[/color]
the[color=blue]
> name to the address in the AfterUpdate in the Address?
>
> So, the Address would read before update:
>
> 1234 Any Street
> AnyTown, USA 12345
>
> and AfterUpdate would read
>
> ANY PERSON
> 1234 ANY STREET
> ANYTOWN, USA 12345
>
> thank you,
>
> Michael[/color]


Closed Thread