Oh, I think I got the idea.
The thing is working... partyally... meaning that when the update happens,
it's changing all the rows in the table for the specified field. I'll try
what you told me and I'll get back to you.
"Jeanette Cunningham" wrote:
> You need a way to identify the current record - such as its Primary Key.
>
> Private Sub cmdBtn_Click()
> Dim varReturn As Variant
>
> varReturn = DLookup("[Field1]", "Table1", "[PkField] = " & Me.PkField)
> End Sub
>
>
> Note: in the above, varReturn may be Null if there is no matching record in
> the table.
>
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
> "Julia82" <(E-Mail Removed)> wrote in message
> news:7F33237A-639F-400A-B69B-(E-Mail Removed)...
> > On button press, check a value from the table1 of current record, field 1
> > and
> > if it's nothing there do something(I have an UPDATE table statement), if
> > it
> > is, leave it that way.
> >
> > I tryed with Dlookup with Nz(Dlookup with if IsNull(Dlookup ... can't get
> > it
> > done.
> >
> > Thank you!
>
>
> .
>
|