ChrisSedgwick
Registered User.
- Local time
- Today, 18:44
- Joined
- Jan 8, 2015
- Messages
- 119
Hi,
I want to update a record when I select a specific option from a combo box in a form.
The concept seems simple, its the code that I struggle with...
I have a combo box in a form that has two options -- "Won" or "Lost"
I have a field in my table called "DateWon"
When I select "Won" from the combo I want the system date to be input into the "DateWon" field in my table.
Sounds simple... I'm just struggling to make it happen with no VBA experience... Just to give you a background to what I've tried (Spare me the embarrassment if I'm miles out) here's what I did...
In my form I created a text box and in the control source input this code:
Haven't named them well, however was trying to get it to work first.
Am I anywhere close or miles out? Either way could someone offer some guidance? Be gentle, still learning!
Thanks in advance...
Chris.
I want to update a record when I select a specific option from a combo box in a form.
The concept seems simple, its the code that I struggle with...
I have a combo box in a form that has two options -- "Won" or "Lost"
I have a field in my table called "DateWon"
When I select "Won" from the combo I want the system date to be input into the "DateWon" field in my table.
Sounds simple... I'm just struggling to make it happen with no VBA experience... Just to give you a background to what I've tried (Spare me the embarrassment if I'm miles out) here's what I did...
In my form I created a text box and in the control source input this code:
Code:
=IIf([Combo526]="Won",[Text615]=Date(),")
Haven't named them well, however was trying to get it to work first.
Am I anywhere close or miles out? Either way could someone offer some guidance? Be gentle, still learning!
Thanks in advance...
Chris.