I have a text box on a form. In that text box is a list of people separated
by a comma. Like A.Smith, L.Jones, P.Somebody, H. Somebodyelse Note, there
is no full stop at the end of the list which is all on one horizontal line.
I need to be able to extract each person in that list and set a field true
for them.
If the textbox is called txtPeople and the field I wish to set = -1 is
called fldTag, is there some simple code I can run from an event to do this?
TIA
dixie 7 1340
Look at the Split() Function in the VB Editor Help. This will give you the
people in the list, with which to work.
Jim Evans
"dixie" <di***@dogmail.com> wrote in message
news:42********@duster.adelaide.on.net... I have a text box on a form. In that text box is a list of people
separated by a comma. Like A.Smith, L.Jones, P.Somebody, H. Somebodyelse Note,
there is no full stop at the end of the list which is all on one horizontal
line. I need to be able to extract each person in that list and set a field true for them.
If the textbox is called txtPeople and the field I wish to set = -1 is called fldTag, is there some simple code I can run from an event to do
this? TIA dixie
You don't really mention what you want to do with the names.
You could place a buttion on your form, and when clicked, it would show each
name. The code would look like:
Dim vList As Variant
Dim i As Integer
vList = Split(me!txtPeople, ",")
For i = 0 To UBound(vList)
Debug.Print vList(i)
Next i
End Sub
The above would extract all names one by one from the txtbox. It is not
clear how/when you want to set the fldTag field? Do you have more then one
fldTag?
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal
It is a list of supervisors accompanying a group. Say I wish to edit the
list and add one more supervisor. All supervisors names for the entry are
stored in a single field and they were added to that field basically by
setting a True/False field (fldTag) to true and having each one of them
appended to the list with a comma-space delimiting them.. After they are in
the collective field, the true false tag is reset to false. Now, if I wish
to later add a supervisor to the existing list, I click their name in a
combo box, their tag is set and they replace the multiple names already in
the field. What I was aiming to do was at the same time as selecting the
new supervisor, have the names in the list in the text box also have their
tag set to true. This should ensure all the supervisors, including the
existing ones and the new one(s) will be placed in the List field. So,
answering your questions, the fldTag field should be set for all people in
the list as an after update event from clicking the new person in a
supervisor combo box, and there is only one fldTag.
I'm afraid explaining things is not my forte. Does that make sense?
dixie
"Albert D. Kallal" <ka****@msn.com> wrote in message
news:T2kRd.420683$8l.348553@pd7tw1no... You don't really mention what you want to do with the names.
You could place a buttion on your form, and when clicked, it would show each name. The code would look like: Dim vList As Variant Dim i As Integer
vList = Split(me!txtPeople, ",")
For i = 0 To UBound(vList)
Debug.Print vList(i)
Next i
End Sub
The above would extract all names one by one from the txtbox. It is not clear how/when you want to set the fldTag field? Do you have more then one fldTag?
-- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal
OK, I am at the stage where I can click a button and get a list of the
supervisors in the immediate window, but what I want to do with this Split
is simply to set a boolean field for each one to true. I can't seem to make
the connection between getting a list of names in the immediate window and
doing this?
dixie
"dixie" <di***@dogmail.com> wrote in message
news:42********@duster.adelaide.on.net... It is a list of supervisors accompanying a group. Say I wish to edit the list and add one more supervisor. All supervisors names for the entry are stored in a single field and they were added to that field basically by setting a True/False field (fldTag) to true and having each one of them appended to the list with a comma-space delimiting them.. After they are in the collective field, the true false tag is reset to false. Now, if I wish to later add a supervisor to the existing list, I click their name in a combo box, their tag is set and they replace the multiple names already in the field. What I was aiming to do was at the same time as selecting the new supervisor, have the names in the list in the text box also have their tag set to true. This should ensure all the supervisors, including the existing ones and the new one(s) will be placed in the List field. So, answering your questions, the fldTag field should be set for all people in the list as an after update event from clicking the new person in a supervisor combo box, and there is only one fldTag.
I'm afraid explaining things is not my forte. Does that make sense?
dixie
"Albert D. Kallal" <ka****@msn.com> wrote in message news:T2kRd.420683$8l.348553@pd7tw1no... You don't really mention what you want to do with the names.
You could place a buttion on your form, and when clicked, it would show each name. The code would look like: Dim vList As Variant Dim i As Integer
vList = Split(me!txtPeople, ",")
For i = 0 To UBound(vList)
Debug.Print vList(i)
Next i
End Sub
The above would extract all names one by one from the txtbox. It is not clear how/when you want to set the fldTag field? Do you have more then one fldTag?
-- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal
OK, I am at the stage where I can click a button and get a list of the
supervisors in the immediate window, but what I want to do with this Split
is simply to set a boolean field for each one to true. I can't seem to make
the connection between getting a list of names in the immediate window and
doing this?
dixie
"dixie" <di***@dogmail.com> wrote in message
news:42********@duster.adelaide.on.net... It is a list of supervisors accompanying a group. Say I wish to edit the list and add one more supervisor. All supervisors names for the entry are stored in a single field and they were added to that field basically by setting a True/False field (fldTag) to true and having each one of them appended to the list with a comma-space delimiting them.. After they are in the collective field, the true false tag is reset to false. Now, if I wish to later add a supervisor to the existing list, I click their name in a combo box, their tag is set and they replace the multiple names already in the field. What I was aiming to do was at the same time as selecting the new supervisor, have the names in the list in the text box also have their tag set to true. This should ensure all the supervisors, including the existing ones and the new one(s) will be placed in the List field. So, answering your questions, the fldTag field should be set for all people in the list as an after update event from clicking the new person in a supervisor combo box, and there is only one fldTag.
I'm afraid explaining things is not my forte. Does that make sense?
dixie
"Albert D. Kallal" <ka****@msn.com> wrote in message news:T2kRd.420683$8l.348553@pd7tw1no... You don't really mention what you want to do with the names.
You could place a buttion on your form, and when clicked, it would show each name. The code would look like: Dim vList As Variant Dim i As Integer
vList = Split(me!txtPeople, ",")
For i = 0 To UBound(vList)
Debug.Print vList(i)
Next i
End Sub
The above would extract all names one by one from the txtbox. It is not clear how/when you want to set the fldTag field? Do you have more then one fldTag?
-- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal
dixie wrote: OK, I am at the stage where I can click a button and get a list of
the supervisors in the immediate window, but what I want to do with this
Split is simply to set a boolean field for each one to true. I can't seem
to make the connection between getting a list of names in the immediate
window and doing this?
dixie
Hi Dixie,
Here are some key words that may prove useful: RecordsetClone (before
loop), FindFirst, NoMatch, Edit, Update, Refresh (after loop). I think
Albert just used Debug.Print to show you that the names are available
in vList(i). I would also consider the possibility of using a separate
table to hold the list of supervisors accompanying the groups. It
might be simpler to implement, or not.
James A. Fortune
Chumps can sit ... We'll stand up.
-- Malcolm X
dixie wrote: OK, I am at the stage where I can click a button and get a list of
the supervisors in the immediate window, but what I want to do with this
Split is simply to set a boolean field for each one to true. I can't seem
to make the connection between getting a list of names in the immediate
window and doing this?
dixie
Hi Dixie,
Here are some key words that may prove useful: RecordsetClone (before
loop), FindFirst, NoMatch, Edit, Update, Refresh (after loop). I think
Albert just used Debug.Print to show you that the names are available
in vList(i). I would also consider the possibility of using a separate
table to hold the list of supervisors accompanying the groups. It
might be simpler to implement, or not.
James A. Fortune
Chumps can sit ... We'll stand up.
-- Malcolm X This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Calvin FONG |
last post by:
Dear all,
Are there any utility that can be call by python to create self
extracting zip file. I'm now using the powerarchiever. But the command
line options aren't flexible enough. Basically, I...
|
by: svilen |
last post by:
hi.
this was named but it is
misleading.
i want to have the order of setting items in intrinsic dicts (keyword
args, or class attributes, etc). which is, a prdered dict trhat
matches the...
|
by: Steve |
last post by:
Hi,
I have a very long string, someting like:
DISPLAY=localhost:0.0,FORT_BUFFERED=true,
F_ERROPT1=271\,271\,2\,1\,2\,2\,2\,2,G03BASIS=/opt/g03b05/g03/basis,...
|
by: Dickyb |
last post by:
Extracting an Icon and Placing It On The Desktop (C# Language)
I constructed a suite of programs in C++ several years ago that handle my
financial portfolio, and now I have converted them to...
|
by: Abhi |
last post by:
Hi-
I'm looking for C# code sample that will extract the list of websites
from the IIS manager. anyone?
Thanks!
|
by: Randy |
last post by:
Is there any way to do this? I've tried tellg() followed by seekg(),
inserting the stream buffer to an ostringstream (ala os << is.rdbuf()),
read(), and having no luck.
The problem is, all of...
|
by: Werner |
last post by:
Hi,
I try to read (and extract) some "self extracting" zipefiles on a
Windows system. The standard module zipefile seems not to be able to
handle this.
False
Is there a wrapper or has...
|
by: Ant |
last post by:
Hi all,
My kids have a bunch of games that have to be run from CD (on Windows
XP). Now they're not very careful with them, and so I have a plan.
I've downloaded a utility (Daemon Tools) which...
|
by: Andreas Tawn |
last post by:
-----Original Message-----
g] On Behalf Of Steve Holden
Can't help with a recipe, but here's the formal spec if want to figure
it out yourself.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
| |