Results 1 to 4 of 4

Thread: Where (XP/2K)

  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Where (XP/2K)

    What am I doing wrong here?

    DoCmd.OpenForm "frmnewpurchase", , , "IDTotalPurchase =" & intTotalPurchase
    I am getting the form open with no records. The form opens, so I have the name of the form correct. intTotalpurchase is an integer field so I assume it does not need quotes. I remember seeing a really clear writeup of how to write where clauses. I cannot find it now

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Where (XP/2K)

    Set a breakpoint on the line you posted (either click in the gray margin to the left of the line, or click in the line, then select Debug | Toggle Breakpoint)

    Now run the code that contains this line. Execution will pause, with the line highlighted. Hover the mouse over intTotalPurchase. You should see its value. Is it correct? You can continue execution by pressing F5.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Where (XP/2K)

    I did the same thing by putting in a debug.print and it is giving me the right number that should be filtering it. Any ideas?
    Thanks

  4. #4
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Where (XP/2K)

    I figured it out.
    The form was set to data entry in its property sheet. I just added at the end of the openform "acFormEdit", and everything worked
    Thanks for the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •