Solved Problems with combo box

lodmark

Member
Local time
Today, 02:48
Joined
Jul 24, 2020
Messages
232
In my database that manages my record collection, I have an album form.
When I add a new album, I select the artist from a combo box that is linked to a table of artists.
If the artist is not in the table, a form for adding a new artist will appear.

Now to my problem.
Adding an artist whose name is completely missing from the artist table works perfectly.
But if part of the name already exists, I can only choose one of those suggested.
I want to add an artist named just Tom but the artist table already includes Tom Robinson, Tom Jones and Tom Petty.
I can not choose only Tom. If I add a space after Tom, it works.
Should I leave it at that?
What is wrong?
I thought it had to do with Limit to list but it is set to Yes and it must otherwise it does not work On Not in List procedure that starts the add artist form.
Anyone who can point me in the right direction?
Please!

Leif
 
I would have thought it would not work, UNTIL it could not match an artist?

So if you had Jones and Petty already and wanted to add just Tom, then perhaps Tom; to get the NotInList to work?, Then remove the ;
 
Hi. Just a guess but try turning off auto complete.
 
I would have thought it would not work, UNTIL it could not match an artist?

So if you had Jones and Petty already and wanted to add just Tom, then perhaps Tom; to get the NotInList to work?, Then remove the ;
This actualy worked, but I've then got other problems that I must look into.
Leif
 
Also you will have problems when you have music by the artist formerly known as ; :D
 
I have now taken a closer look at it.
And it works if I add an extra character that is not in the table and then delete it in the "NewArtist" form.
When I close the NewArtist form, the new artist is added to the table, but in the combo box it still says "Leif;" and I can not "choose "Leif".
A message box will also appear saying "The text you entered is not an item in the list".
If I close the form completely and start it again I can "choose "Leif".
It seems like I need to refresh the table somewhere in my code.
I have tried with Me.Requery, but there is no query with that code.
Is there any other way to fetch the table again?

Leif
 
Well you would not requery the form would you, just the combo, but then you would most likely lose the selection?
Also when the NewArtist form is opened, you could remove the ; in code?
You could also likely do it to the combo from the NewArtist form, so that when you return, you have the real name.?

All theory for me, so you would have to test?
Is there a Refresh for a combo?
 
I post the file for you @Gasman

The form is the one called frm_record2.
Start it and left click in the field for "Artist / Grupp".
The reason is to add a artist to a song, but you can do this in a field that already has an artist too add another one, just for a test.
When the message box appear click No.
In the empty field, add an artist.
Next message box want to know if you want to add the artist, click Ja (Yes).
The form for new artist appears, click "Spara och stäng" (Save and close).
Now the message box that says "The text you entered isn't an item in the list.
How to get past that?

I've put some code to refresh the form but it didn't help.
You've called yourself an enthusiastic Amateur, that makes me a happy amateur.
Thanks for the help.

Leif
 

Attachments

Sorry, no good giving it to me, I only have 2007, plus I rarely write code for people. I do not use Access seriously anymore either.
 
I think I have found a small part of the problem.
@MajP Your function FindAsYouTypeCombo caused options in the table to be displayed when entering and this resulted in none other than those already in the table being displayed.
When I removed that feature, it worked.
At the same time, it was a good thing that the FAYTCombo did.
Maybe it can be modified?

Leif
 
Hi Leif. I'm currently on the road today but will take a look later, unless someone else does. Cheers!
No problem @theDBguy your input is always welcome, but read my last post before you look in to the problem. Maybe I've solved it?

Leif
 

Users who are viewing this thread

Back
Top Bottom