GoToRecord

  • Thread starter Thread starter Csaba Bona
  • Start date Start date
C

Csaba Bona

Gruppe1.MoveFirst
Do While Not Gruppe1.EOF

If CVar(Gruppe1.Fields
(TabellenAktionStruktur.PrimärSchlüssel.Name)) = _
Nz
(TabellenAktionStruktur.PrimärSchlüssel.Wert, 0) Then
DoCmd.GoToRecord , , acGoTo,
Gruppe1.AbsolutePosition
Exit Do
End If
Gruppe1.MoveNext
Loop

'***************************************************
The above Code searches a certain Record within an opened
form (after entering a new record). But it doesn't, if
the 'ActiveControl' is a CheckBox. Why?
 
For a text box, the default property will return the value of the field. For
a chjeck box it returns if the box is selected or not. Since you will always
get a True Or False answer, your NZ will always return the same value as it
cannot be null.




Gruppe1.MoveFirst
Do While Not Gruppe1.EOF

If CVar(Gruppe1.Fields
(TabellenAktionStruktur.PrimärSchlüssel.Name)) = _
Nz
(TabellenAktionStruktur.PrimärSchlüssel.Wert, 0) Then
DoCmd.GoToRecord , , acGoTo,
Gruppe1.AbsolutePosition
Exit Do
End If
Gruppe1.MoveNext
Loop

'***************************************************
The above Code searches a certain Record within an opened
form (after entering a new record). But it doesn't, if
the 'ActiveControl' is a CheckBox. Why?
 
Back
Top