Solved Show the value without opening the DropDown List (1 Viewer)

Sarah.M

Member
Local time
Today, 11:21
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason (Cybersecurity).
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
------------------------------------------------
I want to Show the value without opening the DropDown List, I put the syntax on Default Value but still not working I got error #Type! :cautious: :( as shown in the picture
if you have better way I appreciated
plz help me 🙏

Sample DB Attached

1669491963547.png

1669491947757.png
 

Attachments

  • SearchAnyPart.accdb
    1.1 MB · Views: 68

mike60smart

Registered User.
Local time
Today, 09:21
Joined
Aug 6, 2017
Messages
1,905
Hi Sarah

Why complicate things.

The Form should be bound to EmployeeT

Then just use a Combobox in the Header of the Form.

Very easy to create and easy for the user.

But try this version attached.
 

Attachments

  • SearchAnyPart.zip
    39.2 KB · Views: 66
Last edited:

Sarah.M

Member
Local time
Today, 11:21
Joined
Oct 28, 2021
Messages
335
Hi Sarah

Why complicate things.

The Form should be bound to EmployeeT

Then just use a Combobox in the Header of the Form.

Very easy to create and easy for the user.

But try this version attached.
Thank you for your reply
No, I want when I type something or when I paste text on txtSearch, I want it to appear directly in the list without opening it
so I use DLookup in Default Value
Try to help me to make it happened 🙏
 

mike60smart

Registered User.
Local time
Today, 09:21
Joined
Aug 6, 2017
Messages
1,905
Thank you for your reply
No, I want when I type something or when I paste text on txtSearch, I want it to appear directly in the list without opening it
so I use DLookup in Default Value
Try to help me to make it happened 🙏
Have you tried typing something into the No 2 Textbox?
 

Sarah.M

Member
Local time
Today, 11:21
Joined
Oct 28, 2021
Messages
335
Have you tried typing something into the No 2 Textbox?
Yes I did it works if I open the fullname list,
But wht I need, is the result appears aumaticly in the list without opening fullname list
I want to let Ms Access, when I type something and it matches, any thing in the list pick it and show it by your self
I apologize, I try to explain as best I can :(

🙏
 

mike60smart

Registered User.
Local time
Today, 09:21
Joined
Aug 6, 2017
Messages
1,905
Yes I did it works if I open the fullname list,
But wht I need, is the result appears aumaticly in the list without opening fullname list
I want to let Ms Access, when I type something and it matches, any thing in the list pick it and show it by your self
I apologize, I try to explain as best I can :(

🙏
Sorry I can only get this to work by using VB

Can't get a Macro to do it
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 09:21
Joined
Sep 12, 2006
Messages
15,656
I don't know how expert Mike is in macros, but I imagine many of us are just used to using code and might not understand macros well enough to achieve the same result with a macro, even if it is possible. I'm sure we've had discussions about ridiculous IT practices like this. Maybe with yourself. It's just crazy.
 

isladogs

MVP / VIP
Local time
Today, 09:21
Joined
Jan 14, 2017
Messages
18,221
Whether or not you have to use macros, this is the opposite of the normal approach
Normally you select an item from the combo box and the selected item can then be displayed in a textbox
Trying to do the opposite makes no sense
 

GPGeorge

Grover Park George
Local time
Today, 01:21
Joined
Nov 25, 2004
Messages
1,867
I have used a similar technique to filter items for a list box, but not to try to select one item in a list in a combo box. As Colin said, that's just the opposite of this projected approach.

Implementing it with a macro certainly seems like a stretch, too.

All of that said, it might be an interesting challenge.
 

GPGeorge

Grover Park George
Local time
Today, 01:21
Joined
Nov 25, 2004
Messages
1,867
If I understand your requirement correctly, this is an example of one way to filter a combo box list using a contains search in a text box with a macro.
 

Attachments

  • ContainsSearchwithMacro.zip
    1.1 MB · Views: 71

mike60smart

Registered User.
Local time
Today, 09:21
Joined
Aug 6, 2017
Messages
1,905
If I understand your requirement correctly, this is an example of one way to filter a combo box list using a contains search in a text box with a macro.
Hi George

You did exactly the same as me.
However the Op wants the value to be displayed automatically in the Combobox
 

bastanu

AWF VIP
Local time
Today, 01:21
Joined
Apr 13, 2010
Messages
1,402
Maybe something like this?
 

Attachments

  • SearchAnyPartVlad.accdb
    488 KB · Views: 81

Sarah.M

Member
Local time
Today, 11:21
Joined
Oct 28, 2021
Messages
335

Maybe something like this?
Very beautiful and very cool 🙆‍♀️
but can we keep FullName Bound and use DefaultValue instead of RecordSource? to keep it bound and to keep the dropdownlist works as second option, just in case if dlookup did not find the name in txtSearch 🙏
 

bastanu

AWF VIP
Local time
Today, 01:21
Joined
Apr 13, 2010
Messages
1,402
Sarah, you going to have to explain a bit more about the intended usage of this form; the default value of a control will only apply to new records, yet you seem to want to build some sort of search utility which implies loading existing records.
Cheers,
 

Sarah.M

Member
Local time
Today, 11:21
Joined
Oct 28, 2021
Messages
335
Sarah, you going to have to explain a bit more about the intended usage of this form; the default value of a control will only apply to new records, yet you seem to want to build some sort of search utility which implies loading existing records.
Cheers,
It works Thanks!
 

bastanu

AWF VIP
Local time
Today, 01:21
Joined
Apr 13, 2010
Messages
1,402
(y)
Glad to hear! Good luck with your project!

Cheers,
 

Users who are viewing this thread

Top Bottom