Results 1 to 9 of 9
  1. #1
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88

    SubForm on Click event

    hello, i have a SubReport where it has technician name Field and Item name Field and a Quantity Field



    basically it represents which Technicians has taken what items and how much, its 3 fields 1 record

    i have a formula on the technician ID Field on click event where if i click on ID of technician, it would open up detailed info at which dates this particular technician has received or given all items.

    heres the formula.

    Code:
    if Not IsNull([TechniciansID])
     openReport
           ReportName: "the other detailed report here" <-- which has both the Technician ID and Item ID in it
                  View: Report
         Filter Name: 
    Where Condition: ="[TechniciansID]=" & [TechniciansID]
       Window Mode:Dialog
    ok now what im looking for is a way to look at a particular Technician with a particular item

    like, once clicked upon Technician ID i would see, This technician, and This Item in my other detailed report

    the purpose of this is so i could measure each technicians activity with 1 item only.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Along the lines of

    "[TechniciansID]=" & [TechniciansID] & " And ItemID = " & [ItemID]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    when i click on the ID field it prompts "Type missmatch" =l hmmm,

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If a field is text it requires delimiters:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    umm im extreamly sorry it is a text field cuz im still working on the tables of the items since every Machine has its own List of items and their so many so sorry yes its a text field manually set atm but thx very much for the site

  6. #6
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    nvm but thx for the help i'd rather create a table and write items names there and go back to the combo-box and re-write it

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I wasn't suggesting you change the data, but the code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    raffi is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Mar 2014
    Location
    Inside a Sub Procedure
    Posts
    88
    its ok i created a table and i set in the "[TechniciansID]=" & [TechniciansID] & " And ItemID = " & [ItemID] and it works

    now i have item table and technicians table the only downside is for every new item i have to go and create it in the item form and really its not taking much time doing that plus the bright side im actually creating my items table slowly, over time it will be complete while im actually doing transactions and providing technicians with items. thx for the help its all good

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Glad you got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Click event of form?
    By BLFOSTER in forum Programming
    Replies: 3
    Last Post: 04-25-2014, 11:29 AM
  2. On click event script
    By VOLB in forum Programming
    Replies: 2
    Last Post: 02-21-2014, 03:44 PM
  3. List Box Click Event
    By bginhb in forum Forms
    Replies: 3
    Last Post: 04-09-2012, 02:06 PM
  4. On-Click Event Procedure
    By tbassngal in forum Forms
    Replies: 6
    Last Post: 07-20-2011, 07:06 AM
  5. On Click Event Procedure
    By MrDean in forum Forms
    Replies: 3
    Last Post: 10-07-2009, 07:16 AM

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