Re: requery lookup information
- From: Angi <angiw@xxxxxxx>
- Date: Tue, 2 Dec 2008 07:23:13 -0800 (PST)
On Dec 2, 10:14 am, "Dirk Goldgar"
<d...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"Angi" <an...@xxxxxxx> wrote in message
news:6bf5fca9-57c5-4d46-9d67-2809b76f2aa8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a lookup form that displays information based on what is
selected from an unbound combo box (cboLU).
I've added a cmd button (cmdRemove) to the bottom of the form to
delete (make inactive) the current record. It takes the name out of
cboLU, but it doesn't requery the main information. I end up with a
blank in the combo box, but the form stays filled in.
My current code is:
Me.Inactive = True
Me.Dirty = False
Me.cboLU.Requery
Me.Requery
My form source is:
SELECT tblStudent.*, tblStudent.SdtID FROM tblStudent WHERE
(((tblStudent.SdtID)=[Forms]![frmStudentLU]![cboLU]));
I've tried using Me.SdtID.Requery, but that didn't work either. Any
help would be appreciated. TIA
I assum the rowsource of cboLU excludes inactive records? I think that you
have requeried cboLU but not cleared its value (which, since it is no longer
in the rowsource, doesn't display). Add the line:
Me.cboLU = Null
before you requery the form.
--
Dirk Goldgar, MS Access MVPwww.datagnostics.com
(please reply to the newsgroup)- Hide quoted text -
- Show quoted text -
That was it. Thank you!
.
- References:
- requery lookup information
- From: Angi
- Re: requery lookup information
- From: Dirk Goldgar
- requery lookup information
- Prev by Date: Re: requery lookup information
- Next by Date: Re: Add New only takes first record
- Previous by thread: Re: requery lookup information
- Next by thread: Add New only takes first record
- Index(es):
Relevant Pages
|