Thanks for adding your version Aceman. I'm going to bookmark this page because now I have 5 different workable methods to strip duplicates from strings.
MajP,
Sometimes the easiest solution is the most obvious. You are absolutely correct!!! All I had to do was use the DISTINCT option to filter out the duplicates. I don't know how I missed that. I think I've been working way too hard - it's time for a vacation:)
Thanks MajP. I initially posted this in the 'Forms' forum and then decided it should have been posted here. I replied to the posts in the 'Forms' forum, so you can check there for my reply. Thanks for your suggestion.
Thanks MajP and UnicornRainbow.
I thought no one was going to respond and I was pressed for time, so I tried to come up with my own method using various string functions - not sure if it's the most efficient, but it does work. Here it is:
I am looping through a recordset to build my string...
Does anyone know a quick and efficient method to strip duplicates from a string?
For example:
My string = "AB, CD, AB, EF"
My string without duplicates = "AB, CD, EF"
Thanks
Does anyone know a quick and efficient method to strip duplicates from a string?
For example:
My string = "AB, CD, AB, EF"
My string without duplicates = "AB, CD, EF"
Thanks
Aceman, I didn't think of putting a combobox on the main form, but I think I will end up doing it that way, as I can't think of any other solutions.
Thanks All!
Bad news for me...
I tested my idea, and it works fine - but only if there is just one matching record. It does not work when there are multiple records that match the 'Name', and I do need to filter the main form to return as many records as match the search text.
I just came up with a possible solution, but I'm not sure if it will work.
I'm going to try to do a 'Find' for the 'Name' on the recordset for the recordsource of the subform, then use the ID# of the found record to pull up the corresponding record on the main form, which will in turn pull up...
AceMan, I think I now understand what you are saying - but that does not work for what I am attempting to accomplish.
The 'Name' field is not listed in the recordsource of the main form - there is only an 'ID#' field in the recordsource of the main form. When the user wishes to lookup a record...
So AceMan, I understand your point that the subform should not control the Parent. I don't really understand what you mean by changing a record on the Parent.
Are you saying if I want to lookup a 'Name' located in the subform's recordset, I have to add the 'Name' field to the Parent's...
I have a main form with a linked subform. I have a text box on the main form allowing the user to enter data that they want to use to filter the form.
This works fine when the field being filtered is on the main form. It does not work at all when the field being filtered is on the subform...
After your open a form with a recordsource, the data is pulled in from a table. Assuming that the table is located on a server and is not local to the database, if you use the filter command, does Access hit the table again to complete the filter request or is the processing done at the form...
Thanks belovedcej. I considered that option, but it only works if the database is actually opened daily. What if the database is not opened for a few days? It's possible that is the only solution, but I would like to know if there are any other options are available that I may not be aware of.
I need to send automatic emails to different recipients based on data that has not changed for a certain amount of days. Most of the posts I have looked at in this forum are for the opposite - send an email when data has changed.
Here is an example for my case:
Field value = "Pending". If...
I am trying to customize a field code in my Word 2000 mail merge document so that the last name displays with an apostrophe + "s" if the last name does not end in "s", or it should display with just an apostrophe if the last name ends in "s".
Example:
If last name ends in "s", as in Simmons...
I set up a Mail Merge that will use Word 2000 as the front end and an Access 2000 query as the data source. The merge will be run from a command button on an Access form. Everything works fine, except when I use code to close the Mail Merge template without saving it, I'm still prompted to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.