Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not On List (Access 2002)

    Help,
    I have a code which works to check not on list, but need it to check 2 pieces of info, I Have Fields Horse or PonyID(prim Key) Members No Horse or Pony Name.
    The present code checks to see if horse or pony not on list against Horse or Pony Id and advises accordingly, but a horse or pony is entered with the same name, but owned by someone else it will just accept it as true, I need to have the function to also check the Member as well as the ID as many members have more than 1 Horse which also could have the same name as another Members Horse . Help Much Apprieciated

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

    Re: Not On List (Access 2002)

    Does your code really check against "Horse or Pony ID" or against "Horse or Pony Name"?

    If you can post the (relevant part of) your code, we may be able to give specific advice.

    Note: using spaces in field names will make working with the database more difficult than necessary, and it is confusing: Horse or PonyID(prim Key) Members No Horse or Pony Name is not exactly clear. Try names such as MemberNo and HorseOrPonyName (or shorten it to SteedName).

  3. #3
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Not On List (Access 2002)

    Hansv
    Thanks for your reply not in list is on horse or pony name on a combo box and checks against horse or pony name .
    See attached Hope this helps sorry for being a pest
    Attached Files Attached Files

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

    Re: Not On List (Access 2002)

    What is the row source of the combo box? Does the combo box show all horse/pony names, or only those for the current member?

  5. #5
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Not On List (Access 2002)

    Hans,
    Row Source SELECT [Horse or Pony Name].[Horse or pony ID], [Horse or Pony Name].[Horse or Pony Name] FROM [Horse or Pony Name];
    Shows list of all Horses at all times,
    Hope this Helps

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

    Re: Not On List (Access 2002)

    If you show the names of all horses/ponies in the combo box, there is no need to check the member/animal combination in the Not In List event.
    Instead, set a unique index on the combination of Members and [Horse or PonyName] in the [Horse or Pony Name] table. This will prevent duplicate combinations.

  7. #7
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Not On List (Access 2002)

    Hans,
    Thanks very much for Excellent assistance Without it I would have been at it Days, Now works a treat, glad I joined
    I Have also created not on list Code for other parts I needed to check.

Posting Permissions

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