Results 1 to 3 of 3
  1. #1
    Animeonmymind is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2014
    Posts
    1

    Lookup status in textbox with AfterUpdate event


    Hey everyone

    Thank you in advance for the help on my problem, I've been at this a while.

    This is how my database looks:

    ---

    tblMainDatabase:
    IDMD | Status | Name

    tblScannedForms
    BloodUnitID | BloodUnitIDSF | Specs | ...

    FormScannenFormulieren --> this is linked to tblScannedForms
    BloodUnitID | BloodUnitIDSF | Specs | StatusFromMainDatabase

    ---

    tblMainDatabase stores unique ID's in the field IDMD together with their status. We import these from a BloodUnit program.
    Example:
    • IDMD:X000111 | Status: Completed
    • IDMD:X000112 | Status: Unused


    Whenever a unit is administered we receive a document.
    tblScannedForms is used to scan the documents that have been administered. The ID corresponds to the one in tblMainDatabase When we scan the forms we need to lookup the ID in our BloodUnit program and change the status to "Completed".
    But sometimes the status has already been changed to "Completed" by another person and so we do a lot of double work.


    So my question is:

    I would like to display the Status field from my tblMainDatabase in a textbox on the FormScannenFormulieren when I scan a ID with the UpdateAfter event.
    So if I have a document, I scan the barcode, a code should lookup the barcode in my tblMainDatabase and should return the Status field in the form.

    I've tried this with DLookup, with DAO.Recordset but I'm a beginner and I keep making mistakes in the code.
    Hope you guys can help me out!



    Thanks

  2. #2
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    Maybe you can put an example database (with a few fake records) as an attachment here.
    I use barcode scanners. I can give it a try for you

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    What DLookup() code are you currently using?
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Form AfterUpdate Event
    By RayMilhon in forum Forms
    Replies: 2
    Last Post: 09-09-2011, 09:20 AM
  2. AfterUpdate event help
    By 10 Gauge in forum Forms
    Replies: 11
    Last Post: 09-08-2011, 10:04 AM
  3. AfterUpdate event code error?
    By agripa86 in forum Programming
    Replies: 3
    Last Post: 08-12-2011, 09:12 AM
  4. how to created afterupdate event
    By Brigitt in forum Forms
    Replies: 2
    Last Post: 02-15-2011, 03:23 AM
  5. Replies: 0
    Last Post: 02-01-2011, 04:49 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