Re: Expression not working
- From: "Van T. Dinh" <VanThien.Dinh@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 16 Jul 2005 16:28:13 +1000
At Form_BeforeInsert, I think the Value of RC will be Null and I guess
that'ws why the expression won't work.
In the Form_BeforeInsert Event, add the following code:
Debug.Print Me.RC
Debug.Print IsNull(Me.RC)
and check the Immediate window to see what is printed.
--
HTH
Van T. Dinh
MVP (Access)
"Bassel" <Bassel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:56626147-613E-44C6-B9B4-FE57526A139C@xxxxxxxxxxxxxxxx
> Hello
> I have the following expression
> Me.ID = Nz(DMax("RcId", "StockInventorylog", "RC ='" & Me.RC & "'"), 0) +
> 1
> It's purpose is to add 1 to the ID for each RC value.
> When I put this expression in the Before Update event of another field in
> form it works.
>
> When i put this expression in the before insert event of the form , it
> doesn't work. except for the first time. ie for Id 1 only.
>
> Please can you help me solve this problem
>
> --
> Bassel
.
- References:
- Expression not working
- From: Bassel
- Expression not working
- Prev by Date: Re: Copy a Shortcut Menu from one database to another
- Next by Date: Re: Delete rows created when Error 3159 "Not a valid bookmark" encount
- Previous by thread: RE: Expression not working
- Next by thread: Button for clearing data in access form
- Index(es):