UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
4 Pages V < 1 2 3 4 >  (Go to first unread post)
   Reply to this topicStart new topic
> Search Vba Code Not Recognizing Multi-value Text Boxes, Access 2013    
 
   
sarinadipity
post Apr 23 2020, 03:36 PM
Post#41



Posts: 56
Joined: 20-March 20



QUOTE
What I think I need to do to fix the code on the Search Form is change the Reference Documents and Audits field in the table to be long textbox fields. Then on the Data Entry Form have the reference documents list box choose from the reference table and have any values selected for a record combined in the main table's reference document field as one entry instead of multiple selections. However, I am not entirely sure how to do that without messing up what I have established in other parts of the database.


How could I do this? The fields are list boxes which I have been told arent multivalue fields but they still arent working?
Go to the top of the page
 
theDBguy
post Apr 23 2020, 05:44 PM
Post#42


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. I'm not sure you need to do any of that. The code worked fine for me, just not on your form because there's something wrong with the query. Look at the error message you got. I tried to trace where it's (the extra bracket in the syntax error) coming from; but since I am not familiar with your database, I couldn't find it. That's why I said you need to fix the query first because you created it, so you should be able to understand the error message and know where to fix it.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
sarinadipity
post Apr 27 2020, 12:48 PM
Post#43



Posts: 56
Joined: 20-March 20



I tried to fix the coding by recombining front end and back end and now none of the codes will work. Ugh I am at a loss on this right now
Go to the top of the page
 
theDBguy
post Apr 27 2020, 12:52 PM
Post#44


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. I think the code works fine. I told you, the query was what was broken for me. If you fix the query, then the code should just work. So, to save your sanity, I'd say start over without using any code. Create your query and try to manually apply a filter in the Audits column. Once you get that working, you can post the new db, and we can try to add the "code" for the search form part (one at a time).

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
theDBguy
post Apr 27 2020, 12:59 PM
Post#45


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. Just to clarify what I am trying to say. When I open the query "tblQualityQMSDocuments_SiteSpecific" and then click the filter dropdown arrow on the Audits column and uncheck the Blanks checkbox, I get the following error message.

Attached File  error.png ( 6.02K )Number of downloads: 2


Notice the double square brackets? I can't tell where that's coming from (without digging really deep into your query and tables). I am hoping you would be able to quickly fix it.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
theDBguy
post Apr 27 2020, 01:16 PM
Post#46


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. Just as a follow up and troubleshooting, I bound the form to the table instead of the query, and I was able to make the code work.
Attached File  search.png ( 254.64K )Number of downloads: 7

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
Griditem
post Apr 28 2020, 01:21 PM
Post#47



Posts: 5
Joined: 28-April 20



Ok so in a report if you have to print some or all elements of the collection, how does that work?
Go to the top of the page
 
sarinadipity
post Apr 28 2020, 01:22 PM
Post#48



Posts: 56
Joined: 20-March 20



Yeah I know the table works but I need to somehow get it to work with the query which seems to not be possible
Go to the top of the page
 
theDBguy
post Apr 28 2020, 01:23 PM
Post#49


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


QUOTE (Griditem)
Ok so in a report if you have to print some or all elements of the collection, how does that work?
Hi. Welcome to UtterAccess! Please explain, collection of what exactly?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
sarinadipity
post Apr 28 2020, 01:25 PM
Post#50



Posts: 56
Joined: 20-March 20



I found part of the issue. I had to change the names on some of the fields and it keeps going back and forth between recognizing the old name and the new name. How do I scrub the database so it no longer is reading it as the old name?
Go to the top of the page
 
theDBguy
post Apr 28 2020, 01:30 PM
Post#51


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


QUOTE (sarinadipity)
Yeah I know the table works but I need to somehow get it to work with the query which seems to not be possible

I don't agree. This is an image of a table with a MVF.
Attached File  table.png ( 30.98K )Number of downloads: 1

This is an image of a query based on that same table with a MVF.
Attached File  query.png ( 29.74K )Number of downloads: 1

This is the result of applying a filter to the MVF column (f7).
Attached File  filter.png ( 17.57K )Number of downloads: 3

As you can see, it's very possible to filter a query with a MVF.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
theDBguy
post Apr 28 2020, 01:32 PM
Post#52


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


QUOTE (Sarinadipity)
I found part of the issue. I had to change the names on some of the fields and it keeps going back and forth between recognizing the old name and the new name. How do I scrub the database so it no longer is reading it as the old name?
You will have to explain that a bit. I am not familiar with your database enough to understand what that means. What names are you referring to?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
sarinadipity
post Apr 28 2020, 03:01 PM
Post#53



Posts: 56
Joined: 20-March 20



So as I stated before I was learning as I went along. There are a few things wrong with the field names. For one, they have spaces in them which I know I shouldn't have done and two, a few of the field names were decided they needed to be called different things. For example, the IMS field in the search is called QMS in the table. I tried to change the names over but the autochange feature will not work on spilt databases and it wasn't functioning correctly when I did it manually.

So what I tried to do the past few days was unspilt the database, change the names and work from there. That was a disaster because then none of the codes or features wanted to work. Now I went back to the backup I made before I unsplit it and I am back to where we were originally. I am not sure why some things function at some points then start to malfunction at the smallest changes. When the document search is hooked to a table it is fine, when I filter the document search it is fine but it will not recognized either multi value field even though I know in other cases like you pointed out it can.
Go to the top of the page
 
theDBguy
post Apr 28 2020, 03:08 PM
Post#54


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. Like I said earlier, don't worry about the code for now. Create a new database, put your tables in it, and then create queries to see if you can filter the MVFs. Once you get that to work, we can go back to working with the code and fix it.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
sarinadipity
post Apr 29 2020, 01:04 PM
Post#55



Posts: 56
Joined: 20-March 20



For the sort its saying there is a syntax error on it even though there isnt one. Im very stuck on how to fix it.
Go to the top of the page
 
theDBguy
post Apr 29 2020, 01:13 PM
Post#56


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. Did you try what I suggested above? Start over! Create a new database file and import your one table with MVF into it. See if you can filter the table. If you can, create a query and see if you can filter it. Let us know how that goes. There could be something wrong with your existing file, and trying to keep using it may not be very productive right now. Just my 2 cents...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
sarinadipity
post May 5 2020, 02:31 PM
Post#57



Posts: 56
Joined: 20-March 20



I have one MVF filled by a value list of 3 different values and I have the other filled by a table which is updated by a query. What is your recommended way to fill a MVF field with?
Go to the top of the page
 
theDBguy
post May 5 2020, 03:05 PM
Post#58


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


Hi. I'm not sure I understand your question; but if you're asking how to populate the MVF field with multiple data at once, I think you'll need to use VBA code (specifically Recordsets) to do it. I haven't looked at it in a while, but maybe check out my demo on MVFs from my website. Let me know if that doesn't help.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
sarinadipity
post May 7 2020, 02:27 PM
Post#59



Posts: 56
Joined: 20-March 20



I think I found a way around my issue but not entirely sure. In the search code I have in the sample database how would I reference the subform so that the reference value search box searches that? Having the reference value MVF on the main form is causing a lot of repetition so Im thinking if I put the subform to use for the code then I can eliminate the MVF in the query which fixes the sort issue.
Go to the top of the page
 
FrankRuperto
post May 7 2020, 06:32 PM
Post#60



Posts: 1,099
Joined: 21-September 14
From: Tampa, Florida USA


Are we having fun yet with MVF's?... I encourage you to not use them as they're a nightmare to work with.
This post has been edited by FrankRuperto: May 7 2020, 06:32 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
4 Pages V < 1 2 3 4 >


Custom Search


RSSSearch   Top   Lo-Fi    5th July 2020 - 09:42 PM