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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Nested IF 7
Loop inside a loop 6
How to .GoToRecord on another form 2
GoToRecord 1
Looping Through Records 3
Simple Loop Recordset Question 2
Do/Loop Dilemma 6
ADO, how to move through this recordset 3

Back
Top