Variable length string entered and concatenated with a constant st

K

Kay

Somehow I just cannot find the answer to my problem in the archived
discussions.

I wish to achieve the following data entry outcome in FORMS and direct entry
to a TABLE :

fundname = variable length name (alphanumeric) + "SUPER FUND"

Example

Enter ABC results in ABC SUPER FUND
XYZ 123 BIG COMPANY returns XYZ 123 BIG COMPANY SUPER FUND

Note while "SUPER FUND" may be the suffix in 99% of cases it may
occasionally be necessary to delete or edit this once the record has been
updated.

Example
XYZ 123 BIG COMPANY SUPER FUND may be needed to be edited to
XYZ 123 BIG COMPANY EMPLOYEE FUND

PS I am not a VB or programming wizard, therefore simple solutions, if
possible, are probably going to help me the best. Thanks
 
P

PC Datasheet

Your form needs to be based on the table or a query based on the table. You
need a textbox named FundName bound to the FundName field. Set the enabled
property of the textbox to No and the Locked property to Yes. Add an unbound
textbox named EnterFundName. Next to this textbox add a command button with
the caption Clear. Put this code in the click event of the button:
Me!EnterFundName = Null
Add another unbound textbox named SuffixToFundName. Next to this textbox add
a commandbutton with the caption Clear. Put this code in the click event of
the button:
Me!SuffixToFundName = Null
Put the following code in the AfterUpdate event textbox named EnterFundName:
If Not IsNull(Me!SuffixToFundName) Then
Me!FundName = Me!EnterFundName & " " & Me!SuffixToFundName
Else
Me!FundName = Me!EnterFundName & " " & "SUPER FUND"
End If

Arrange the SuffixToFundName and EnterFundName textboxes and their
associated buttons so the user must enter the Suffix before the fundname.

To use:
If the user wants the fund name saved to the table to end with "SUPER FUND"
he leaves the suffix textbox blank or if it has something in it he clicks on
the clear button. He then enters the fund name in the EnterFundName textbox.
If he enters ABC, ABC SUPER FUND will appear in the locked textbox named
FundName. If the user then goes to another record or closes the form, ABC
SUPER FUND will be saved to the table. If the user mistakenly entered ACB,
ACB SUPER FUND will appear in the locked textbox named FundName. The user
can either type over ACB to get ABC and everything proceeds as previously
described or the user can click on Clear and SUPER FUND will appear in the
locked textbox named FundName. The user can then enter ABC in the
EnterFundName textbox and ABC SUPER FUND will appear in the locked textbox
named FundName.

If the user wants the fund name saved to the table to end with "EMPLOYEE
FUND" he leaves must first enter EMPLOYEE FUND in the suffix textbox. All
the same things happen as described above except in the description SUPER
FUND becomes EMPLOYEE FUND.
 
K

Kay

Thank you, very much appreciated.

PC Datasheet said:
Your form needs to be based on the table or a query based on the table. You
need a textbox named FundName bound to the FundName field. Set the enabled
property of the textbox to No and the Locked property to Yes. Add an unbound
textbox named EnterFundName. Next to this textbox add a command button with
the caption Clear. Put this code in the click event of the button:
Me!EnterFundName = Null
Add another unbound textbox named SuffixToFundName. Next to this textbox add
a commandbutton with the caption Clear. Put this code in the click event of
the button:
Me!SuffixToFundName = Null
Put the following code in the AfterUpdate event textbox named EnterFundName:
If Not IsNull(Me!SuffixToFundName) Then
Me!FundName = Me!EnterFundName & " " & Me!SuffixToFundName
Else
Me!FundName = Me!EnterFundName & " " & "SUPER FUND"
End If

Arrange the SuffixToFundName and EnterFundName textboxes and their
associated buttons so the user must enter the Suffix before the fundname.

To use:
If the user wants the fund name saved to the table to end with "SUPER FUND"
he leaves the suffix textbox blank or if it has something in it he clicks on
the clear button. He then enters the fund name in the EnterFundName textbox.
If he enters ABC, ABC SUPER FUND will appear in the locked textbox named
FundName. If the user then goes to another record or closes the form, ABC
SUPER FUND will be saved to the table. If the user mistakenly entered ACB,
ACB SUPER FUND will appear in the locked textbox named FundName. The user
can either type over ACB to get ABC and everything proceeds as previously
described or the user can click on Clear and SUPER FUND will appear in the
locked textbox named FundName. The user can then enter ABC in the
EnterFundName textbox and ABC SUPER FUND will appear in the locked textbox
named FundName.

If the user wants the fund name saved to the table to end with "EMPLOYEE
FUND" he leaves must first enter EMPLOYEE FUND in the suffix textbox. All
the same things happen as described above except in the description SUPER
FUND becomes EMPLOYEE FUND.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
 
P

PC Datasheet

Your welcome!

If you ever need outside help on any application, please keep me in mind.

Steve
PC Datasheet
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
 

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

Top