M
Mishanya
My frmPackages has cboSelectPackage, based on tblPackages wich finds and
loads the selected package' recordset by AfterUpdate Event
Private Sub SelectPackage_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PackageID] = " & Str(Nz(Me![SelectPackage], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
frmPackages also has button to open frmAddPackageName wich serves for adding
new package name (frmPackages is single-view and I don't want users to add
new names directly in it but to manage all the names separately).
The cboSelectPackage has On Enter event Me.cboSelectPackage.Requery as well
in order to get the newly aded names..
Now, when I add new name in frmAddPackageName, close it and get back to
frmPackages (wich stayed open), I do see the new name in the
cboSelectPackage. But when I choose it, instead of loding new blank
recordset, I get the first PackageID recordset from tblPackages.
The problem resolves, if I close and reopen the frmPackages or add new name
while frmPackages is closed.
What do I miss?
loads the selected package' recordset by AfterUpdate Event
Private Sub SelectPackage_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PackageID] = " & Str(Nz(Me![SelectPackage], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
frmPackages also has button to open frmAddPackageName wich serves for adding
new package name (frmPackages is single-view and I don't want users to add
new names directly in it but to manage all the names separately).
The cboSelectPackage has On Enter event Me.cboSelectPackage.Requery as well
in order to get the newly aded names..
Now, when I add new name in frmAddPackageName, close it and get back to
frmPackages (wich stayed open), I do see the new name in the
cboSelectPackage. But when I choose it, instead of loding new blank
recordset, I get the first PackageID recordset from tblPackages.
The problem resolves, if I close and reopen the frmPackages or add new name
while frmPackages is closed.
What do I miss?