PDA

View Full Version : Solved: onclick popup to fill text box.



leeweaver
10-14-2008, 07:28 AM
I want to use a onclick popup to auto fill a text box instead of using a list box.

I have realy no clue how to procede with this.

Lee

CreganTur
10-14-2008, 07:58 AM
What exactly are you trying to do?

What is an onclick popup? OnClick is a Form event. Are you wanting an input box to appear when the user clicks on a specified form object?

Are you thinking of a combobox perhaps?

Your question is a little vague, so could you provide some more specifics?

leeweaver
10-14-2008, 09:46 AM
I understand that on-click is an event.

I want a box to pop up and allow the user to select a appropriate choice for entry into the text box.

The information for this text box will be comming form another table that contains valid entries.

So in it's basic sense Yes I want an input box to appear. but I need to write the code that will give the choices available, probably as buttons in the popup

I do not want a combo box because I was informed that lookup fields are "EVIL" on several other occasions.

CreganTur
10-14-2008, 10:21 AM
I do not want a combo box because I was informed that lookup fields are "EVIL" on several other occasions.
:wot ... I really don't understand that view. Lookup fields are perfect for restricting a user's selections and comboboxes are basically fancy listboxes.

One idea would be for your OnClick event to open another form as a "popup" (just adjust the Modal properties accordingly if needed). This popup Form would have a listbox that the user could choose from- then use some VBA to push the selection into the specified textbox on your main form.

Now... doing the above will look cool, but it's really double work. The best option would really be replacing this textbox with a combobox that is prefilled with all of the available selections.

leeweaver
10-14-2008, 10:28 AM
aren't combo boxes limited to 25 entires?

nepotist
10-14-2008, 10:30 AM
No

CreganTur
10-14-2008, 10:39 AM
A combobox can display ~65k entries.

I don't reccomend showing that many, as it will take a long time to query that many entries.

leeweaver
10-14-2008, 10:47 AM
so the easy way to do this is with a combo box. and load it with VBA so it's not a lookup field. thanks for the information.

It appears you have saved me much work.