Re: Refresh Recordset after NotInList update
From: Albert D. Kallal (pleasenonosspammkallal_at_msn.com)
Date: 03/25/04
- Next message: Jeff Conrad: "Re: Create a Form Password"
- Previous message: Albert D. Kallal: "Re: Refreshing Function in realtime."
- In reply to: PC: "Refresh Recordset after NotInList update"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Mar 2004 10:20:27 -0700
You seem to left out the detail that this is combo box to "move to" or
search for a new record. We are also to assume that this combo box is
un-bound...right? (again, this info was/is needed).
To show any new records added on a form via code, you have to requery the
form (me.requery). You could try using a me.requery, but I don't think it
will work while the notinlist event has been fired.
(so, try placing a me.Requery in the notinlist code if a new record is
added..but as mentioned...you can't really requery a whole form while in the
middle of a combo box selection!
So, if the above does not work, then I would thus try setting some flag in
the notinlist event, and then in the combo after update event, I would try
the following:
in notinList, I would use a forms level flag, and a forms level var call
NewTrans
> Set rst = db.OpenRecordset(sqlTransRef, dbOpenDynaset)
> rst.AddNew
> rst!TransRef = NewData
> rst.Update
NewTrans = NewData
bolMyAdded = True
Then, in the after update
if bolMyAdded = True then
' seach/move to new reocrd.
me.Requery
me.cmbTransRef = NewTrans
end if
' your other remaing code here in the combo after update event that moves
to the correct record can follow...
-- Albert D. Kallal (MVP) Edmonton, Alberta Canada pleasenonoSpamKallal@msn.com http://www.attcanada.net/~kallal.msn
- Next message: Jeff Conrad: "Re: Create a Form Password"
- Previous message: Albert D. Kallal: "Re: Refreshing Function in realtime."
- In reply to: PC: "Refresh Recordset after NotInList update"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|