473,513 Members | 3,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading first line of textbox Updating in AfterUpdate

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
Nov 13 '05 #1
1 2549
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" <lu*************@aol.com> wrote in message
news:20***************************@mb-m10.aol.com...
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

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
16853
by: David Gray | last post by:
Greetings all, I'm working on a program that allows a user to enter notes in a multiline textbox. I would like to be able to read the contents of the textbox (as records - one per line) and store in an array then a file. Perhaps this is the wrong control to use as there seems no way of referencing each line of the text box.
6
12701
by: Suresh Kumaran | last post by:
Hi All, Does anybody know the sytax in VB.NET to write the contents of a multiline text box to a text file? Appreciate help. Suresh
5
14517
by: John Sheppard | last post by:
Hi there Does anyone know how to fill a bound textbox automaticlly. In an unbound textbox I would put in the control source =Sum(price, tax) (or some such function) and access updates it automaticlly. Is there a way to do the same thing on a bound textbox so that it is automaticly updated?
2
1659
by: Basic | last post by:
Why doesn't this code work: -------------------------code snippet----------------- Dim categorysource As String categorysource = "SELECT ., ., ." & _ " FROM KSTUDY_KSTUDY " & _ " WHERE . = " & Me.List0.Value Me.List4.RowSource = categorysource
2
2840
by: simonmarkjones | last post by:
Is there a simple way to capatalise the first letter of every word typed into a textbox on a form. Someone told me to use "Proper" but not sure if this is correct or how and where to use it. Please can someone help. Many thanks in advance!
8
31780
by: MLH | last post by:
I have a textbox on a form into which an alpha-numeric string of data is entered. I wish to force the casual user, who would sometimes use upper case, sometimes not and sometimes MIX the case - yes, believe it - to use UPPER case only. I tried running UCASE on the string entered during the textbox's BeforeUpdate event code. That did nothing...
2
1998
by: George | last post by:
The flow of my app is as follows 1) Pull up an order and change the quantity of a textbox item. (Ex: change the quantity from 1 to 2 2) Click on the Update button 3) When the page posts back you should see the updated quantity of the item. (by the way, in some cases there will be multiple lines for an order...this is where the problem comes in....
3
1788
by: lizii | last post by:
i have a file - which on each line has some data i need to fill into a box - now although reading in the data is simple enough and putting it in the correct box will be no problem, as i can just read a lilne then put into the corresponding box...it just seems like a task i should be able to complete in a few lines...rather than quite a few...
6
3668
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7563
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5703
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3252
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.