Update Form Fields with a Command Button

KHStump

New member
Local time
Today, 01:39
Joined
Nov 4, 2003
Messages
7
I have two feilds in my form "Current_Step" and "Next_Step". The "Next_Step" is a combo feild. I would like to choose the "Next_Step" then have a command button to update the "Current_Step". When "Current_Step" is updated, I also need to set two different date fields to Null. I was going to attempt this with an Append Query, but still do not know how to reset the date fields to Null. Can someone please help? I am guessing I will need an event proceedure for the "On Click".
 
You won't need an append query if you are using a bound form. Just put your code in the AfterUpdate event of the Next_Step combo.
 
I still need to know how to set the date feilds to null. Thanks for your quick reply.
 
You need vb

Assumption: You know somewhat VBA
txtnext_step is the name of the field contain next_step and so on.

============================================
you can put after update on your next_step

if me.txtnext_step = something then
me.txtcurrent_step = somthing
else
me.txtcurrent_step = ""
end if

You can use this to your current_step after update
if me.txtcrrent_step = "whatever"
me.field1.value = ""
me.field2.value = ""
end if
============================================

Good Luck
Dianna
 

Users who are viewing this thread

Back
Top Bottom