I have created a form that has only an Unbound Text Box and a Control
Button
In addition I have created many forms each with a different purpose
I wish to create an interface for the user to open the selected form
by entering the form name in the unbound text box and pressing the
Control Button
I seem to be having trouble getting my code to recognise that the
selection is based on the value of the unbound Text box
Is this possible - having search the groups I have not found any
solutions that seem to specifically show how this is done
would appreciate any help regards to this issue
DoCmd.OpenForm Me.[the unbound text box]
BUT, using a text box where users have to type the name of a
form can be a disaster when a user enters an invalid form
name. You probably should create a little table with the
form name as PK and a text field for somethng descriptive
about the form. Then use a combo box based on that table
and set its LimitToList proprty to Yes so users can not
enter an invalid name.
--
Marsh
Thanks for the swift response
Just to clarify I am using the same comand and unbound text box which
is changed to a combo box based on the new table that contains all the
form names and the users select the appopriate form from a drop down
menu or does the LimitToList Property to yes mean that the user enters
the form name as previously suggested but it protects the form from an
invalid form name being entered
Ponty
>On 26 Nov, 00:35, Marshall Barton <marshbar...@wowway.com> wrote:
>> Ponty wrote:
>> >I have created a form that has only an Unbound Text Box and a Control
>> >Button
>>
>> >In addition I have created many forms each with a different purpose
>>
>> >I wish to create an interface for the user to open the selected form
>> >by entering the form name in the unbound text box and pressing the
>> >Control Button
>>
>> >I seem to be having trouble getting my code to recognise that the
>> >selection is based on the value of the unbound Text box
>>
>> DoCmd.OpenForm Me.[the unbound text box]
>>
>> BUT, using a text box where users have to type the name of a
>> form can be a disaster when a user enters an invalid form
>> name. �You probably should create a little table with the
>> form name as PK and a text field for somethng descriptive
>> about the form. �Then use a combo box based on that table
>> and set its LimitToList proprty to Yes so users can not
>> enter an invalid name.
>>
>
>Just to clarify I am using the same comand and unbound text box which
>is changed to a combo box based on the new table that contains all the
>form names and the users select the appopriate form from a drop down
>menu or does the LimitToList Property to yes mean that the user enters
>the form name as previously suggested but it protects the form from an
>invalid form name being entered
LimitToList will not allow an entry that is not in the combo
box's list, regardless of how it is entered or selected.
It might be useful to know that if the list is sorted, then
the AutoExpand property allows users to select an entry by
typing the first few characters. Play with it and see how
it works. If the list is not sorted on the first visible
column, it's best to set AutoExpand to No.
--
Marsh