I don't understand your question about 'separating the steps'? Can you
elaborate on what that means?
--
Ken Snell
http://www.accessmvp.com/KDSnell/
<(E-Mail Removed)> wrote in message
news:455d29e6-f867-4bd9-9a40-(E-Mail Removed)...
On Aug 14, 1:06 pm, "fish...@hotmail.com" <fish...@hotmail.com> wrote:
> On Aug 14, 12:55 pm, "Ken Snell" <kthsneisll...@ncoomcastt.renaetl>
> wrote:
>
>
>
>
>
>
>
>
>
> > If [field1] > [field2] Then
> > DoCmd.OpenForm "form1"
> > ElseIf [field1] < [field2] Then
> > DoCmd.OpenForm "form2"
> > Else
> > MsgBox "Values are equal"
> > End If
> > --
>
> > Ken Snellhttp://www.accessmvp.com/KDSnell/
>
> > <fish...@hotmail.com> wrote in message
>
> >news:2730d55b-0af5-477f-80f9-(E-Mail Removed)...
>
> > > Can someone tell me how to write an 'if' argument that would do the
> > > following:
>
> > > [field1] = predetermined date&time
> > > [field2] = now()
>
> > > i would like the program to compare the two fields and do the
> > > following
>
> > > if [field1]>[field2] then open [form1]
> > > if [field 1]<[field2] then open [form2]
>
> > > Can someone please help me get my head around this?
>
> > > thanks
> > > Steve
>
> Thanks Ken
Ken, i`m running into a problem now. Below is the code with the
correct field and form names
I`m really doing 2 steps here.
step1- update text1 to now()
step2- compare the value of text1 to locktrigger and act accordingly.
question is how do i separate the steps so this will run correctly
Private Sub Form_Load()
Text1 = Now()
If [locktrigger] > [Text1] Then
DoCmd.OpenForm "frmLogin1"
ElseIf [locktrigger] < [Text1] Then
DoCmd.OpenForm "terms"
Else
MsgBox "Values are equal"
End If
End Sub