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