+ Reply to Thread
Results 1 to 1 of 1

How to put a link in only 1 field of a select statement

Hybrid View

  1. #1
    Registered User
    Join Date
    07-29-2012
    Location
    Fort Erie, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    1

    Question How to put a link in only 1 field of a select statement

    I have a select statement that returns a list of animals for a whole bunch of different choices selected on the form. It works great, but in order to add a feeding for an individual animal, I have to click on the animal, which brings up it's inventory profile. I then click on the feedcard button, and then on the feedcard I click on an add feeding button which brings up the addfeeding form. When feeding close to a hundred animals and having to add these each, I would love to have a button at the end of each line that will allow me to go directly to the addfeeding. I can't really do a 2nd listbox beside this one as the list can be long depending on the choices made and therefore have scrolling. Basically I want something like a hyperlink or better yet button the says "Add Feeding" at the end of my lines in my listbox. Here's my current coding, I know it's probably not the way any of you would have done it, but I'm a newbe and I figured it out as I went.

    SELECT inventory.idcode AS ID, [inventory.genus]+" "+[inventory.species]+" "+nz([inventory.subspecies],"") AS [Bi/Trinomial Name], IIf(inventory.***="♂","Male",IIf(inventory.***="♀","Female","Unknown")) AS ***, nz(inventory.DOB,"Unknown") AS [Birth Date], nz(inventory.cageid,"Unknown") AS Location, inventory.feedin AS FeedIn, nz(inventory.lastfeeding,"Not Eaten") AS [Last Fed], inventory.image AS [Image?]
    FROM (morph RIGHT JOIN ((class INNER JOIN animals ON class.Class = animals.Class) INNER JOIN (ordertab INNER JOIN (family INNER JOIN (inventory INNER JOIN genus ON inventory.species = genus.species) ON family.genus = genus.genus) ON ordertab.family = family.family) ON class.order = ordertab.order) ON morph.idcode = inventory.idcode) LEFT JOIN cage ON inventory.cageid = cage.cageid
    WHERE (((IIf([sexlookup]="Male",inventory.***="♂",IIf([sexlookup]="Female",inventory.***="♀",IIf([sexlookup]="Unknown",inventory.***="?",""))))<>False) And ((IIf([birthchoice]<>"" And [birthchoice]<>"All",[birthchoice]=inventory.birth,""))<>False) And ((IIf([cagechoice]<>"Show All",[cagechoice]=inventory.cageid,""))<>False) And ((IIf([ShowOnly]="Current Inventory",inventory.status="Keep" Or inventory.status="Available",IIf([ShowOnly]="Sold",inventory.status="Sold",IIf([ShowOnly]="Deceased",inventory.status="Deceased",IIf([ShowOnly]="Perminent (Keepers)",inventory.status="Keep",IIf([ShowOnly]="Available",inventory.status="Available",IIf([ShowOnly]="No Longer in Inventory",inventory.status="Deceased" Or inventory.status="Sold","")))))))<>False) And ((IIf([classchoice]=" Complete Inventory","",IIf([commonclasschoice]=" Complete Inventory","",IIf([orderchoice]=" Show All "+[classchoice],[classchoice]=class.Class,IIf([commonorderchoice]=" Show All "+[commonclasschoice],[commonclasschoice]=animals.commonclass,IIf([familychoice]=" Show All "+[orderchoice],[orderchoice]=ordertab.order,IIf([commonfamilychoice]=" Show All "+[commonorderchoice],[commonorderchoice]=class.commonorder,IIf([genuschoice]=" Show All "+[familychoice],[familychoice]=family.family,IIf([specieschoice]=" Show All "+[genuschoice],[genuschoice]=genus.genus,IIf([subspecieschoice]=" Show All "+[specieschoice],[specieschoice]=inventory.species,IIf([subspecieschoice]<>"",[subspecieschoice]=inventory.subspecies,IIf([specieschoice]<>"",[specieschoice]=inventory.species,[commonnamechoice]=genus.commonname))))))))))))<>False) And ((IIf([special1choice]="Morph" And [special3choice]<>"",morph.morph=[special3choice],IIf([special1choice]="Status" And [special3choice]<>"",[special3choice]=inventory.status,"")))<>False))
    GROUP BY inventory.idcode, [inventory.genus]+" "+[inventory.species]+" "+nz([inventory.subspecies],""), IIf(inventory.***="♂","Male",IIf(inventory.***="♀","Female","Unknown")), inventory.DOB, inventory.cageid, inventory.feedin, inventory.lastfeeding;
    Last edited by Cutter; 07-29-2012 at 12:18 PM. Reason: Added code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1