Set value function

amator

Registered User.
Local time
Tomorrow, 01:13
Joined
Aug 1, 2006
Messages
23
Hi
I have make a combo box which uses table like this:
[month] [start date] [end date]
january 1.1.2006 31.1.2006
february 1.2.2006 28.2.2006
...
When user chooses month I want that start date will be showed in textbox in form. And end date will be also showed in another text box.
So I have make a macro which will be completed when user clicks the combo box. But how I can tell to Access in my macro which field I want to "go" into text box. I have make a statement : "[Forms]![form1]![Combobox2]" but how I can add to this that which field I want "go" to the text box.
I try to do in my macro two set value functions because I want start date to textbox1 and end date to textbox2. Please help.
 
In the AfterUpdate of the ComboBox put this

Code:
Me.TextBoxName = Me.ComboName.Column(1)

Note the column number refers to the StartDate in my example, column numbers always start at 0 - its all in Access help if you fancy a search.

Col
 
Thanks very very much. (I try to search and think this for long time before you give me this advice)
 

Users who are viewing this thread

Back
Top Bottom