Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Entrey in the form (Access 2000)

    How can i make an entry in a form and concatenate this entry
    into an expression?

    I force the user to open a module where it is written:
    Public Const ProductNumber As Integer = 1

    Then the user changes the number from 1 to the number he wishes and after that
    i use this number in a code:

    delete * from Products where ProductID " & ProductNumber &

    However, it seems to me that opening a module by the user it too cumbersome
    and is not the best way.i would like to use the following method:
    make an unbound control in a form and somehow make it possible to accept the entries
    After that to use something like that:

    delete * from Products where ProductID " & Forms!Control1.Value &

    I tried in vain to have this control saved in the form and make the code workable.
    Is it possible at all?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Entrey in the form (Access 2000)

    You should use :
    "delete * from Products where ProductID = " & Forms!YourFormName!Control1
    without Value and note the = after ProductID
    Francois

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Entrey in the form (Access 2000)

    How do you manage to change the value of a constant?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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