moose
01-10-2002, 06:30 AM
i have a combo box where the user selects there own name and i have a text box for the date. what i want is when the user selects their name from the combo, the text box populates with the date after the last entry date.
any ideas please?
moose
01-11-2002, 03:21 AM
i have worked out how to populate it now but instead of it giving me the users name it gives me the id number instead.
please please help
moose
01-11-2002, 03:25 AM
Oooops! sorry! wrong message.
i have a combo box with user names and the after update event opens a form with the last data entry date in. i want a text box to show the user name selected but it just shows the id number instead
Fizzio
01-11-2002, 03:57 AM
Here is your solution http://www.access-programmers.co.uk/ubb/Forum4/HTML/005373.html
moose
01-11-2002, 06:47 AM
i tried the code in the other post but that still didn't work.
any other ideas please?
Fizzio
01-14-2002, 04:24 AM
You need to tell the textbox which column the name is in. Typically, column 0 contains your ID field and column 1 contains your data (Look at your table / query /SQL structure for the order). You will then need to set the textbox value to
Me.YourTextBox = Forms![NameOfComboForm]![ComboName].Column(ColumnWhereNamesAre)
You could do this on form_open for example.
HTH
moose
01-14-2002, 04:58 AM
i now get the message
run time error '2135'
this property is read-only and can't be set
any sugestions please
Fizzio
01-14-2002, 07:03 AM
is the textbox bound to anything ?
moose
01-14-2002, 07:05 AM
Yes, it is bound to the 'NAME' field in my table
Fizzio
01-15-2002, 03:23 AM
If it is a new record in the second form where you are trying to put the name, try
= Forms![NameOfComboForm]![ComboName].Column(ColumnWhereNamesAre)
in the default value of the txtBox.
If this does not work, make sure that you have yes on all the Allow ... properties of the form.
If no luck, post the recordsource of your form - is it a query / table.