Results 1 to 5 of 5
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    Checking to see if previously used.

    Attached is a db with a table and query. Query doesn't work but can be used as a reference.

    In the query I use a Dlookup to find the parent ID:

    Code:
    116CH1: IIf([Equip LIN]="XXB840",DLookUp("[unique_id]","[Data]","[unique_id] ='" & [parent_equipment_item_id] & "'" & " And [Equip Lin]='XXB286'"),"")
    116CH2: IIf([Equip LIN]="XXB841",DLookUp("[unique_id]","[Data]","[unique_id] ='" & [parent_equipment_item_id] & "'" & " And [Equip Lin]='XXB286'"),"")
    If I had a second radio on the mount is 116R 1 CH1/116R1CH2 and 116R2CH1/116R2CH2 on the same Platform_ID. How would I check to see if that Platform_ID has been previously used?

    116Test.accdb

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    ??? What are you trying to do in very simple, plain English?
    Pose the question in the same manner you would ask:
    -an 8 yr old who doesn't know database
    -your 80 yr old gramma.

    We need some context for the question in order to offer a
    advice/suggestion.

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Thats what I get for being in a hurry....

    Say i have a Vehicle with a radio mount called 116. On that mount I have 2 Radios installed. Each radio has 2 Channels.

    It would look like this in a Text document
    116 Mount
    .....Radio 1
    ..........Channel 1
    ..........Channel 2
    .....Radio 2
    ..........Channel 1
    ..........Channel 2


    Excel:
    Code:
    EquipNm unique_id parent_equip_item_id platform_id Equip LIN 116Radio 116CH1 116CH2 116Out
    Radio 2785486 2785485 2785482 XXB286 2785485
    Radio 2785490 2785489 2785482 XXB286 2785489
    Channel 1 2785498 2785486 2785482 XXB840 2785486 116R1CH1
    Channel 1 2785503 2785490 2785482 XXB840 2785490 116R2CH1
    Channel 2 2785497 2785486 2785482 XXB841 2785486 116R1CH2
    Channel 2 2785502 2785490 2785482 XXB841 2785490 116R2CH2
    If you look at the platform_ID It is repeated for both radios, but each radio has a different unigue_ID. Thus the below set is the numerical designation as depicted in text above.

    2785485 (116 Mount)
    .....2785486 (Radio)
    ..........2785498 (Channel 1)
    ..........2785497 (Channel 2)
    .....2785490 (Radio)
    ..........2785503 (Channel 1)
    ..........2785502 (Channel 2)

    If both are on thew same mount and are not the same radios, I need to differentiate between them.

    Both are on Mount 2785485

    Radio set 1 is 2785486
    Radio set 2 is 2785490

    I have the channel information elsewhere for each Radio Channel:

    Data.116R1CH1
    Data.116R1CH2
    Data.116R2CH1
    Data.116R2CH2

    For Radio set 1 I can set it as:

    116Out: IIf([116CH1]<>"","116R1CH1",IIf([116CH2]<>"","116R1CH2",""))

    Now that is fins for a single radio on the mount.
    How do I differentiate when it is the second radio on the same mount. (platform_id is the same)? IIF([platform_id ?????,[Radio 1],IIF([platform_id ?????,[Radio 2],""))????????
    Basically if radio 1 is present on platform, use radio 2.

    Is this a better description?

    Thanks

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    ??? Readers are not in the radio mount and channel business--at least not many.

    In 4-5 lines of the simplest English just tell us what you are trying to do--simple, no jargon.

    You have some sort of "Mount", that can contain 1 or more "Radios" that operate/receive/monitor 1 or more "Channels". Work from that and correct it as necessary.

    This is an example of the type of info to tell readers:

    ZYX Laboratories requires an employee tracking database. They want to track information about employees, the employee's job history, and their certifications. Employee information includes first name, middle initial, last name, social security number, address, city, state, zip, home phone, cell phone, email address. Job history would include job title, job description, pay grade, pay range, salary, and date of promotion. For certifications, they want certification type and date achieved.

    An employee can have multiple jobs over time, (ie, Analyst, Sr. Analyst, QA Administrator). Employees can also earn certifications necessary for their job.

  5. #5
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    OK, lets try again.
    I have box with a 2 slots for USB Thumb drives. In order to keep inventory of the boxes a number is assigned to each box. Each USB slot in the box is assigned a letter A or B. The type of information to put on the Thumb stick is determined by the slot its attached to. Slot B needs to know if Slot A is filled. If it is not filled then Slot A information will be downloaded into slot B. If Slot A is filled, then it needs to know so it will get slot B information downloaded.

    Within each box:
    IF USB A = False and USB B is False: Do nothing
    IF USB A = True and USB B = False: Load USB A with information from Slot A
    IF USB A = False and USB B = True: Load USB B with information from Slot A
    IF USB A = True and USB B = True: Load USB A with information from Slot A and load USB information from Slot B.


    What I need to know is if slot A and B is filled in that box. How do I determine if Slot A is filled? Upon that determination, I can tell slot B to look elsewhere for its information.

    I tried: Expr1: Count(IIf([platform_ID]=DLookUp("[platform_ID]","[116DataNets]","[ID]=" & [ID]-1),1,0) and I get "Your Query does not include the specified expression 'ID' as pert of an aggregate function."


    I was thinking if I can count the number of instances where the box inventory number is the same, then I can use count = 1 as USB Slot A, and anything >1 is used for USB B.
    Last edited by Thompyt; 12-27-2016 at 03:05 PM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to recall information previously entered
    By Accu-Grind in forum Forms
    Replies: 4
    Last Post: 11-07-2015, 06:34 AM
  2. Download attachment previously uploaded
    By libraccess in forum Misc
    Replies: 0
    Last Post: 09-12-2013, 02:01 AM
  3. Replies: 3
    Last Post: 05-26-2013, 12:19 PM
  4. Replies: 3
    Last Post: 05-26-2011, 12:52 PM
  5. Remembering previously enetered data
    By tarhim47 in forum Forms
    Replies: 5
    Last Post: 05-03-2011, 04:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums