CuriousGeo
Registered User.
- Local time
- Today, 18:26
- Joined
- Oct 15, 2012
- Messages
- 59
Hello, I have a maintenance database for an instrument that stains biological samples on glass slides. There are a series of containers with different chemicals in them. Of these, a few have Lot numbers and Expiration dates that are necessary to keep track of. The reason for copying them from day to day is because the lots last several months at a time.
The items in the subform are added by using the "Add List" button, which adds the items by insert:
' see if BOTH Name and Date Field are entered
If Len(TechName) > 0 And Len(fldDatePerformed) > 0 Then
DoCmd.SetWarnings False
DoCmd.RunSQL ("Insert INTO tblStainData (FKMasterID, FKStainListID) SELECT " & Me.masterID & ", tblStainList.listID FROM tblStainList WHERE (((tblStainList.Default)=Yes))")
DoCmd.SetWarnings True
End If
Me.Refresh
End Sub
The items all come from the same table.
That table is below:
Two questions:
1. Am I doing this set-up correctly, or should the StainLot and Expiration be in a separate table?
2. Is there a way to copy those two values from those fields into subsequent (new) records, until the lot is used up and we change it?
The items in the subform are added by using the "Add List" button, which adds the items by insert:
' see if BOTH Name and Date Field are entered
If Len(TechName) > 0 And Len(fldDatePerformed) > 0 Then
DoCmd.SetWarnings False
DoCmd.RunSQL ("Insert INTO tblStainData (FKMasterID, FKStainListID) SELECT " & Me.masterID & ", tblStainList.listID FROM tblStainList WHERE (((tblStainList.Default)=Yes))")
DoCmd.SetWarnings True
End If
Me.Refresh
End Sub
The items all come from the same table.
That table is below:
Two questions:
1. Am I doing this set-up correctly, or should the StainLot and Expiration be in a separate table?
2. Is there a way to copy those two values from those fields into subsequent (new) records, until the lot is used up and we change it?
Last edited: