Greetings, I've been teaching myself Access and VB to establish a chain of custody tracking database. I'll hopefully be able to attach the current version of my .mdb so that I might receive some guidance regarding an issue that suddenly appeared. Here's an outline of my intentions and the issue that's come up:
From the switchboard,
1) "Record Pipette Collection From Lab for Calibration" Opens frmCollection, where user scans pipette barcode into the SN field. Data about that pipette then populates the subform. This way, fields like 'lab location' can be verified (e.g., was this collected from the lab it was assigned to).
2) "Record Calibrated Pipette Return from Metrology" Opens frmReceivedPipettes, where user scans in SN and the collection event recorded in frmCollection is retrieved along with data about that pipette (subfrmLIMSpipettes_...)
Both 1) and 2) were working quite well, and so I began to build in more features.
But here is my current problem:
Upon opening frmCollection, when the first SN is scanned in, the associated data appears in the subform just as intended. However, after advancing to a new record and entering a new SN, the subform shows data for the pipette from the previously entered 'collection event'! This is always the case as additional pipette collections are recorded.
Interestingly, when navigating back to previously entered records, the subform data matches up again (i.e., no more mismatch to record entered previously).
In short, I can't figure out why the subform populates the data from the previous record only as new records are entered.
I've messed around with the code a lot and don't know why it isn't working and cannot fix it.
If anyone is willing to have a look at the db I've added, any assistance will be greatly appreciated. I do know that my VB is messy, partly due to my efforts to get things working, which they had been for a bit until this suddenly happened and I haven't yet been able to resolve it.
More thanks, in advance!
From the switchboard,
1) "Record Pipette Collection From Lab for Calibration" Opens frmCollection, where user scans pipette barcode into the SN field. Data about that pipette then populates the subform. This way, fields like 'lab location' can be verified (e.g., was this collected from the lab it was assigned to).
2) "Record Calibrated Pipette Return from Metrology" Opens frmReceivedPipettes, where user scans in SN and the collection event recorded in frmCollection is retrieved along with data about that pipette (subfrmLIMSpipettes_...)
Both 1) and 2) were working quite well, and so I began to build in more features.
But here is my current problem:
Upon opening frmCollection, when the first SN is scanned in, the associated data appears in the subform just as intended. However, after advancing to a new record and entering a new SN, the subform shows data for the pipette from the previously entered 'collection event'! This is always the case as additional pipette collections are recorded.
Interestingly, when navigating back to previously entered records, the subform data matches up again (i.e., no more mismatch to record entered previously).
In short, I can't figure out why the subform populates the data from the previous record only as new records are entered.
I've messed around with the code a lot and don't know why it isn't working and cannot fix it.
If anyone is willing to have a look at the db I've added, any assistance will be greatly appreciated. I do know that my VB is messy, partly due to my efforts to get things working, which they had been for a bit until this suddenly happened and I haven't yet been able to resolve it.
More thanks, in advance!
Attachments
Last edited: