no loop

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • x taol

    no loop

    Set rs = Me.frm_sub.Form .Recordset
    While Not rs.EOF
    Me.frm_sub.Form .fldX = Me.frm_sub.Form .fldY * 0.1
    rs.MoveNext
    Wend

    the upper source code is looping.
    i want to get the result, without loop.
    is it possible?

    *** Sent via Developersdex http://www.developersdex.com ***
  • stejol377

    #2
    Re: no loop


    x taol wrote:
    Set rs = Me.frm_sub.Form .Recordset
    While Not rs.EOF
    Me.frm_sub.Form .fldX = Me.frm_sub.Form .fldY * 0.1
    rs.MoveNext
    Wend
    >
    the upper source code is looping.
    i want to get the result, without loop.
    is it possible?
    >
    *** Sent via Developersdex http://www.developersdex.com ***
    Hi,
    Maybe you just need to look at the query that you are using for
    your recordset, and you could use an IF statement just to make sure
    that you recordset has returned something.

    Hope this helps

    Comment

    • Jamey Shuemaker

      #3
      Re: no loop

      Just set the ControlSource property for the TextBox control containing
      the value for the desired calculated field, fldY, to

      =[fldX]*0.1

      Comment

      Working...